summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-01-14 14:54:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-15 03:18:37 (GMT)
commit1c7c1d179e51f163c014353f33b406f5bae13922 (patch)
treedd9f3a5fe4b313d5ec92e580cec7b8953f3ffbde
parent8dca683346fcd17684eb6646c486461cae38241e (diff)
downloadgit-1c7c1d179e51f163c014353f33b406f5bae13922.zip
git-1c7c1d179e51f163c014353f33b406f5bae13922.tar.gz
git-1c7c1d179e51f163c014353f33b406f5bae13922.tar.bz2
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>
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 0131983d..8b0e0fb 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);