Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-06 02:02:44 +0400
committerJunio C Hamano <gitster@pobox.com>2014-02-06 02:02:44 +0400
commitee5788e306a69933eeb5472e68fd6c4c7105d9ef (patch)
tree4293659044ad256ac7ef8ab062236c3984a10dea /builtin
parentd11ade701a2451e81a28a4fad35b42a57f273753 (diff)
parent64ed07cee0394509c65331f1e7acb36c58fd18fb (diff)
Merge branch 'nd/add-empty-fix' into maint
"git add -A" (no other arguments) in a totally empty working tree used to emit an error. * nd/add-empty-fix: add: don't complain when adding empty project root
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/add.c b/builtin/add.c
index 226f758869..d7e3e44d06 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -544,7 +544,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
for (i = 0; i < pathspec.nr; i++) {
const char *path = pathspec.items[i].match;
- if (!seen[i] &&
+ if (!seen[i] && path[0] &&
((pathspec.items[i].magic &
(PATHSPEC_GLOB | PATHSPEC_ICASE)) ||
!file_exists(path))) {