@matheusbsbs / matheus-bagliano / commits / 1e423f5655
Fork 0

git-add: warn when adding an ignored file with an explicit request.

We allow otherwise ignored paths to be added to the index by spelling its path out on the command line, but we would warn the user about them when we do so. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Dec 25, 2006 at 10:38 UTC 1e423f56558e74a3a94c653108f64f0305199b9a
1 file changed +3
builtin-add.c
+3
@@ -37,6 +37,9 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
37 free(entry);
38 continue;
39 }
40 + if (entry->ignored_entry)
41 + fprintf(stderr, "warning: '%s' is an ignored path.\n",
42 + entry->name);
43 *dst++ = entry;
44 }
45 dir->nr = dst - dir->entries;