From: Junio C Hamano Date: Mon, 25 Dec 2006 18:38:35 +0000 (-0800) Subject: git-add: warn when adding an ignored file with an explicit request. X-Git-Tag: v1.5.0-rc0~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1e423f56558e74a3a94c653108f64f0305199b9a;p=git.git 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 --- diff --git a/builtin-add.c b/builtin-add.c index 822075ac2..c54c69453 100644 --- a/builtin-add.c +++ b/builtin-add.c @@ -37,6 +37,9 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p free(entry); continue; } + if (entry->ignored_entry) + fprintf(stderr, "warning: '%s' is an ignored path.\n", + entry->name); *dst++ = entry; } dir->nr = dst - dir->entries;