summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-07-30 13:20:36 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-07-30 13:20:36 -0700
commit82fafc77bac9b3294b3e67bc021eeb511137c0f7 (patch)
tree37ba8bd8b3b0486ded2c34584cc8ddc410ff2f0b /dir.c
parentMerge branch 'ct/mv-unmerged-path-error' into master (diff)
parentdir: check pathspecs before returning `path_excluded` (diff)
downloadtgif-82fafc77bac9b3294b3e67bc021eeb511137c0f7.tar.xz
Merge branch 'en/fill-directory-exponential' into master
Fix to a regression introduced during 2.27 cycle. * en/fill-directory-exponential: dir: check pathspecs before returning `path_excluded`
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 1045cc9c6f..fe64be30ed 100644
--- a/dir.c
+++ b/dir.c
@@ -2209,13 +2209,13 @@ static enum path_treatment treat_path(struct dir_struct *dir,
baselen, excluded, pathspec);
case DT_REG:
case DT_LNK:
- if (excluded)
- return path_excluded;
if (pathspec &&
!match_pathspec(istate, pathspec, path->buf, path->len,
0 /* prefix */, NULL /* seen */,
0 /* is_dir */))
return path_none;
+ if (excluded)
+ return path_excluded;
return path_untracked;
}
}