@matheusbsbs / matheus-bagliano / commits / 1c7c1d179e
Fork 0

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 <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Clemens Buchacher committed Jan 14, 2009 at 15:54 UTC 1c7c1d179e51f163c014353f33b406f5bae13922
1 file changed +1 -1
dir.c
+1 -1
@@ -118,7 +118,7 @@ int match_pathspec(const char **pathspec, const char *name, int namelen, int pre
118
119 for (retval = 0; (match = *pathspec++) != NULL; seen++) {
120 int how;
121 - if (retval && *seen == MATCHED_EXACTLY)
121 + if (*seen == MATCHED_EXACTLY)
122 continue;
123 match += prefix;
124 how = match_one(match, name, namelen);