Re: [PATCH v2 1/4] apply: reject input that touches outside $cwd

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2 1/4] apply: reject input that touches outside $cwd

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:44

Jeff King [off-list ref] writes:
Right, I do not think these tests will _fail_ when the filesystem does
not support symlinks. But nor are they actually testing anything
interesting. They would pass on such a system even without your patch,
as we would fail to apply even the symlink creation part of the patch.
I thought we write out the contents of the symbolic link as a
regular file on such a filesystem, and as long as we do not expect
"test -h expected-to-be-symlink-we-just-created" to succeed we would
be fine.

Re: [PATCH v2 1/4] apply: reject input that touches outside $cwd

From: Jeff King <hidden>
Date: 2016-06-15 23:03:44

On Tue, Feb 03, 2015 at 01:23:15PM -0800, Junio C Hamano wrote:
Jeff King [off-list ref] writes:
quoted
Right, I do not think these tests will _fail_ when the filesystem does
not support symlinks. But nor are they actually testing anything
interesting. They would pass on such a system even without your patch,
as we would fail to apply even the symlink creation part of the patch.
I thought we write out the contents of the symbolic link as a
regular file on such a filesystem, and as long as we do not expect
"test -h expected-to-be-symlink-we-just-created" to succeed we would
be fine.
But wouldn't we still fail writing "foo/bar" at that point if "foo" is a
regular file (again, we should never do this, but that is the point of
the test).

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help