Skip to content

Commit

Permalink
Merge branch 'nd/maint-fix-add-typo-detection' (early part)
Browse files Browse the repository at this point in the history
* 'nd/maint-fix-add-typo-detection' (early part):
  add: do not rely on dtype being NULL behavior
  • Loading branch information
Junio C Hamano committed Dec 8, 2010
2 parents 4af004a + 0188f6b commit f80b6de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin/add.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f80b6de

Please sign in to comment.