Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nd/add-empty-fix'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 10 Jan 2014 18:33:03 +0000
(10:33 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 10 Jan 2014 18:33:03 +0000
(10:33 -0800)
"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
1
2
builtin/add.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
0c52457
64ed07c
)
diff --cc
builtin/add.c
index 0df73ae73596546966af18e7076d9a6f54964786,d7e3e44d06cdf56ac661600788cfdf751037226e..2a2722fa10aa981695b21984e7c425c35b4f18d0
---
1
/
builtin/add.c
---
2
/
builtin/add.c
+++ b/
builtin/add.c
@@@
-545,9
-544,7
+545,9
@@@
int cmd_add(int argc, const char **argv
for (i = 0; i < pathspec.nr; i++) {
const char *path = pathspec.items[i].match;
- if (!seen[i] &&
+ if (pathspec.items[i].magic & PATHSPEC_EXCLUDE)
+ continue;
+ if (!seen[i] && path[0] &&
((pathspec.items[i].magic &
(PATHSPEC_GLOB | PATHSPEC_ICASE)) ||
!file_exists(path))) {