path: root/dir.c
diff options
authorJens Lehmann <>2010-07-09 22:18:38 (GMT)
committerJunio C Hamano <>2010-07-12 22:13:54 (GMT)
commit108da0db1277fc2f4820d0a47c02b2c63111f7a5 (patch)
tree1684b8bab6530364e446aaa2a437d19521f04e34 /dir.c
parent637ab29b86533c7ce65a615fd445d163a2c57dc9 (diff)
git add: Add the "--ignore-missing" option for the dry run
Sometimes it is useful to know if a file or directory will be ignored before it is added to the work tree. An example is "git submodule add", where it would be really nice to be able to fail with an appropriate error message before the submodule is cloned and checked out. Signed-off-by: Jens Lehmann <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'dir.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 151ea67..133f472 100644
--- a/dir.c
+++ b/dir.c
@@ -453,7 +453,7 @@ static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathna
return dir->entries[dir->nr++] = dir_entry_new(pathname, len);
-static struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
+struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
if (!cache_name_is_other(pathname, len))
return NULL;