diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t7501-commit.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh index 31a6f63399..2e7bcb016a 100755 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -244,4 +244,36 @@ test_expect_success 'multiple -m' ' ' +test_expect_success 'same tree (single parent)' ' + + if git commit -m empty + then + echo oops -- should have complained + false + else + : happy + fi + +' + +test_expect_success 'same tree (merge and amend merge)' ' + + git checkout -b side HEAD^ && + echo zero >zero && + git add zero && + git commit -m "add zero" && + git checkout master && + + git merge -s ours side -m "empty ok" && + git diff HEAD^ HEAD >actual && + : >expected && + diff -u expected actual && + + git commit --amend -m "empty really ok" && + git diff HEAD^ HEAD >actual && + : >expected && + diff -u expected actual + +' + test_done |