mirror of
https://github.com/git/git
synced 2024-08-28 03:59:25 +00:00
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
This commit is contained in:
commit
f80b6de4ec
|
@ -447,7 +447,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||||
if (!seen[i] && pathspec[i][0]
|
if (!seen[i] && pathspec[i][0]
|
||||||
&& !file_exists(pathspec[i])) {
|
&& !file_exists(pathspec[i])) {
|
||||||
if (ignore_missing) {
|
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]));
|
dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
|
||||||
} else
|
} else
|
||||||
die("pathspec '%s' did not match any files",
|
die("pathspec '%s' did not match any files",
|
||||||
|
|
Loading…
Reference in a new issue