Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH] Fix off by one error in prep_exclude.

From: Shawn Bohrer <hidden>
Date: 2016-06-15 22:44:08

On Sun, Jan 27, 2008 at 08:44:57PM +0000, Johannes Schindelin wrote:
Hi,

On Sun, 27 Jan 2008, Shawn Bohrer wrote:
quoted
base + current already includes the trailing slash so adding
one removes the first character of the next directory.

Signed-off-by: Shawn Bohrer <redacted>
---

This fixes the oops part of the issue Johannes found,
have I?
 
Sorry I should have been more explicit Johannes Sixt reported the issue,
you were included simply because you had been involved in the thread.
quoted
but doesn't address the fact that we probably should remove files that 
aren't a part of the repository at in the first place.
I am sorry, but I cannot begin to see what this commit tries to 
accomplish.  Yes, sure, there is an off-by-one error, and your commit 
message says how that was fixed.  But I miss a description what usage it 
would affect, i.e. when this bug triggers.
As far as I can see there are two protential cases that could trigger
this bug, but there may be more.  This first was the arguably invalid
case the Johannes Sixt reported.

git clean -n /

The other case that could trigger this bug and potentially others is if
someone makes their root dircetory a git repository and then uses "/" as
an absolute path.  For example:

cd /
git init
git clean -n /

You may argue that both of these cases are invalid and that is fine by
me, but since I noticed this bug I thought I would send a patch.  If you
wouldlike I can add these two use cases to the commit message.

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