Skip to content

Commit

Permalink
clean up pathspec matching
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Buchacher authored and Junio C Hamano committed Jan 15, 2009
1 parent 8dca683 commit 1c7c1d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1c7c1d1

Please sign in to comment.