summaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2007-08-28 22:41:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-08-29 04:15:25 (GMT)
commitb39c53e662b97108ee1bda72076630d9d0e56211 (patch)
tree9d0aea951934d027cc00ed8dde96141c034ae19d /builtin-add.c
parentce312affa1487b2b3857da7de5cca35d35f3baa7 (diff)
downloadgit-b39c53e662b97108ee1bda72076630d9d0e56211.zip
git-b39c53e662b97108ee1bda72076630d9d0e56211.tar.gz
git-b39c53e662b97108ee1bda72076630d9d0e56211.tar.bz2
git-add: Make the "tried to add ignored file" error message less confusing
Currently the error message seems to imply (at least to me) that only the listed files were withheld and the rest of the files was added to the index, even though that's obviously not the case. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-add.c b/builtin-add.c
index b08e688..105a9f0 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -155,7 +155,7 @@ static int git_add_config(const char *var, const char *value)
static struct lock_file lock_file;
-static const char ignore_warning[] =
+static const char ignore_error[] =
"The following paths are ignored by one of your .gitignore files:\n";
int cmd_add(int argc, const char **argv, const char *prefix)
@@ -250,12 +250,12 @@ int cmd_add(int argc, const char **argv, const char *prefix)
die("index file corrupt");
if (dir.ignored_nr) {
- fprintf(stderr, ignore_warning);
+ fprintf(stderr, ignore_error);
for (i = 0; i < dir.ignored_nr; i++) {
fprintf(stderr, "%s\n", dir.ignored[i]->name);
}
fprintf(stderr, "Use -f if you really want to add them.\n");
- exit(1);
+ die("no files added");
}
for (i = 0; i < dir.nr; i++)