Re: [PATCH] Fix off by one error in prep_exclude.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 28, 2008, 12:04 UTC
- Message-ID
- <7vd4rmtavb.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LSU.1.00.0801281159150.23907@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 11 quoted lines
>> ... >> This only causes a problem when a path component has a length of >> zero which can happen when the user provides an absolute path to >> a file or directory in the root directory (i.e. "/", or "/foo"), >> or if the input is malformed and contains a double-slash such >> as "foo//boo". >> >> Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> > > I'll try to remember even 6 months from now that this was the "git clean > -n /" problem ;-)
Actually the quoted part of the message clearly tells that the patch is touching the wrong code. It should not blame the user but the caller of the function that did not check such an input, which is where the fix should be in.