diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-02-05 14:02:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-05 14:02:44 -0800 |
commit | ee5788e306a69933eeb5472e68fd6c4c7105d9ef (patch) | |
tree | 4293659044ad256ac7ef8ab062236c3984a10dea /t | |
parent | d11ade701a2451e81a28a4fad35b42a57f273753 (diff) | |
parent | 64ed07cee0394509c65331f1e7acb36c58fd18fb (diff) | |
download | git-ee5788e306a69933eeb5472e68fd6c4c7105d9ef.tar.gz |
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 't')
-rwxr-xr-x | t/t3700-add.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh index aab86e838b..fe274e2fb1 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -272,6 +272,25 @@ test_expect_success '"add non-existent" should fail' ' ! (git ls-files | grep "non-existent") ' +test_expect_success 'git add -A on empty repo does not error out' ' + rm -fr empty && + git init empty && + ( + cd empty && + git add -A . && + git add -A + ) +' + +test_expect_success '"git add ." in empty repo' ' + rm -fr empty && + git init empty && + ( + cd empty && + git add . + ) +' + test_expect_success 'git add --dry-run of existing changed file' " echo new >>track-this && git add --dry-run track-this >actual 2>&1 && |