summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-05-18 09:01:01 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-05-18 09:01:01 -0700
commitf2a56171accb4fec03a30e513702283ab90088a1 (patch)
tree75f973558f936898bae9d42e6fb91e8c2ad9ebb5
parentMerge branch 'js/add-edit' (diff)
parentadd: don't complain when adding empty project root (diff)
downloadtgif-f2a56171accb4fec03a30e513702283ab90088a1.tar.xz
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 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]);
}