Skip to content

Commit f80b6de

Browse files
committed
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
2 parents 4af004a + 0188f6b commit f80b6de

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

builtin/add.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
447447
if (!seen[i] && pathspec[i][0]
448448
&& !file_exists(pathspec[i])) {
449449
if (ignore_missing) {
450-
if (excluded(&dir, pathspec[i], DT_UNKNOWN))
450+
int dtype = DT_UNKNOWN;
451+
if (excluded(&dir, pathspec[i], &dtype))
451452
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
452453
} else
453454
die("pathspec '%s' did not match any files",

0 commit comments

Comments
 (0)