projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e23ca9e
)
git-add: warn when adding an ignored file with an explicit request.
author
Junio C Hamano
<junkio@cox.net>
Mon, 25 Dec 2006 18:38:35 +0000
(10:38 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Mon, 25 Dec 2006 18:38:35 +0000
(10:38 -0800)
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>
builtin-add.c
patch
|
blob
|
history
diff --git
a/builtin-add.c
b/builtin-add.c
index 822075ac22beb2b11ee43f84718df71428a67921..c54c6945327838c47caaf03da43235ac3fc2e87e 100644
(file)
--- 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;