From: Junio C Hamano Date: Mon, 28 Jan 2008 12:04:08 GMT Subject: Re: [PATCH] Fix off by one error in prep_exclude. Message-ID: <7vd4rmtavb.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: >> ... >> 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 > > 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.