summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-18 16:01:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-18 16:01:01 (GMT)
commitf2a56171accb4fec03a30e513702283ab90088a1 (patch)
tree75f973558f936898bae9d42e6fb91e8c2ad9ebb5
parent362724af6cf5edf35832ba0dbc7783806a38871e (diff)
parent07d7bedda8d18ffbfe5960ce27b73a24c01cac1a (diff)
downloadgit-f2a56171accb4fec03a30e513702283ab90088a1.zip
git-f2a56171accb4fec03a30e513702283ab90088a1.tar.gz
git-f2a56171accb4fec03a30e513702283ab90088a1.tar.bz2
Merge branch 'jk/maint-add-empty'
* jk/maint-add-empty: add: don't complain when adding empty project root
-rw-r--r--builtin-add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-add.c b/builtin-add.c
index 314380e..bee45f0 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]);
}