OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
0c52457
64ed07c
)
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
diff --cc
builtin/add.c
index
0df73ae
,
d7e3e44
..
2a2722f
---
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))) {