diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-11-08 01:04:58 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-08 11:39:23 -0800 |
commit | ae3cdfe1123d153f720bbe4a4abc97ed3e9f65a4 (patch) | |
tree | ac35f1cd0a104ae090050a57fb5d1b560db3974b /dir.c | |
parent | af77aee9cac51c2036e6019b4aebec2049f03e6b (diff) | |
download | git-ae3cdfe1123d153f720bbe4a4abc97ed3e9f65a4.tar.gz |
dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
Commit c84de70 (excluded_1(): support exclude files in index -
2009-08-20) tries to work around the fact that there is no
directory/file information in index entries, therefore
EXC_FLAG_MUSTBEDIR match would fail.
Unfortunately the workaround is flawed. This fixes it.
Reported-by: Thomas Rinderknecht <thomasr@sailguy.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -360,7 +360,8 @@ int excluded_from_list(const char *pathname, if (x->flags & EXC_FLAG_MUSTBEDIR) { if (!dtype) { - if (!prefixcmp(pathname, exclude)) + if (!prefixcmp(pathname, exclude) && + pathname[x->patternlen] == '/') return to_exclude; else continue; |