From: Clemens Buchacher Date: Wed, 14 Jan 2009 14:54:34 +0000 (+0100) Subject: clean up pathspec matching X-Git-Tag: v1.6.2-rc0~90^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1c7c1d179e51f163c014353f33b406f5bae13922?ds=inline;hp=--cc clean up pathspec matching If pathspec already matched exactly, it cannot match any more. Originally, we had to continue anyways, because we did not differentiate between exact, recursive and globbing matches. Signed-off-by: Clemens Buchacher Signed-off-by: Junio C Hamano --- 1c7c1d179e51f163c014353f33b406f5bae13922 diff --git a/dir.c b/dir.c index 0131983dfb..8b0e0fbaf7 100644 --- a/dir.c +++ b/dir.c @@ -118,7 +118,7 @@ int match_pathspec(const char **pathspec, const char *name, int namelen, int pre for (retval = 0; (match = *pathspec++) != NULL; seen++) { int how; - if (retval && *seen == MATCHED_EXACTLY) + if (*seen == MATCHED_EXACTLY) continue; match += prefix; how = match_one(match, name, namelen);