summaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-25 18:38:35 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-25 18:38:35 (GMT)
commit1e423f56558e74a3a94c653108f64f0305199b9a (patch)
tree5eeb5c316a6328649f8ace625d2eee51ade12fa9 /builtin-add.c
parente23ca9e1f95a756bfe598568be9d03059db1dad2 (diff)
downloadgit-1e423f56558e74a3a94c653108f64f0305199b9a.zip
git-1e423f56558e74a3a94c653108f64f0305199b9a.tar.gz
git-1e423f56558e74a3a94c653108f64f0305199b9a.tar.bz2
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>
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 822075a..c54c694 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;