aboutsummaryrefslogtreecommitdiff
path: root/builtin/add.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-12-08 11:25:52 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-08 11:25:52 -0800
commitf80b6de4eca9c4c4abfe9407736311de27726e53 (patch)
tree151a8fb4ab7c088abeb32126592d09a8416ad508 /builtin/add.c
parent4af004a16379ca846e975f84b00c18c4af3d177a (diff)
parent0188f6b3c191eb5277e9ebab3b9079f923dbd283 (diff)
downloadgit-f80b6de4eca9c4c4abfe9407736311de27726e53.tar.gz
git-f80b6de4eca9c4c4abfe9407736311de27726e53.tar.xz
Merge branch 'nd/maint-fix-add-typo-detection' (early part)
* 'nd/maint-fix-add-typo-detection' (early part): add: do not rely on dtype being NULL behavior
Diffstat (limited to 'builtin/add.c')
-rw-r--r--builtin/add.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 21dc1f733..12b964e64 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -447,7 +447,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
if (!seen[i] && pathspec[i][0]
&& !file_exists(pathspec[i])) {
if (ignore_missing) {
- if (excluded(&dir, pathspec[i], DT_UNKNOWN))
+ int dtype = DT_UNKNOWN;
+ if (excluded(&dir, pathspec[i], &dtype))
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
} else
die("pathspec '%s' did not match any files",