Browse Source

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>
maint
Clemens Buchacher 16 years ago committed by Junio C Hamano
parent
commit
1c7c1d179e
  1. 2
      dir.c

2
dir.c

@ -118,7 +118,7 @@ int match_pathspec(const char **pathspec, const char *name, int namelen, int pre @@ -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);

Loading…
Cancel
Save