diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-11-07 19:04:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-08 20:39:23 +0100 |
commit | ae3cdfe1123d153f720bbe4a4abc97ed3e9f65a4 (patch) | |
tree | ac35f1cd0a104ae090050a57fb5d1b560db3974b /dir.c | |
parent | Fix a formatting error in git-merge.txt (diff) | |
download | git-ae3cdfe1123d153f720bbe4a4abc97ed3e9f65a4.tar.xz git-ae3cdfe1123d153f720bbe4a4abc97ed3e9f65a4.zip |
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; |