summaryrefslogtreecommitdiff
path: root/builtin-add.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-18 09:01:01 -0700
committerJunio C Hamano <gitster@pobox.com>2009-05-18 09:01:01 -0700
commitf2a56171accb4fec03a30e513702283ab90088a1 (patch)
tree75f973558f936898bae9d42e6fb91e8c2ad9ebb5 /builtin-add.c
parent362724af6cf5edf35832ba0dbc7783806a38871e (diff)
parent07d7bedda8d18ffbfe5960ce27b73a24c01cac1a (diff)
downloadgit-f2a56171accb4fec03a30e513702283ab90088a1.tar.gz
Merge branch 'jk/maint-add-empty'
* jk/maint-add-empty: add: don't complain when adding empty project root
Diffstat (limited to 'builtin-add.c')
-rw-r--r--builtin-add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 314380eed0..bee45f00de 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -63,7 +63,7 @@ static void prune_directory(struct dir_struct *dir, const char **pathspec, int p
fill_pathspec_matches(pathspec, seen, specs);
for (i = 0; i < specs; i++) {
- if (!seen[i] && !file_exists(pathspec[i]))
+ if (!seen[i] && pathspec[i][0] && !file_exists(pathspec[i]))
die("pathspec '%s' did not match any files",
pathspec[i]);
}