diff options
Diffstat (limited to 't')
-rw-r--r-- | 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 6bd3c9e3e..b151b51a3 100644 --- a/t/t7501-commit.sh +++ b/t/t7501-commit.sh @@ -131,4 +131,36 @@ test_expect_success \ 'validate git-rev-list output.' \ 'diff current expected' +test_expect_success 'partial commit that involves removal (1)' ' + + git rm --cached file && + mv file elif && + git add elif && + git commit -m "Partial: add elif" elif && + git diff-tree --name-status HEAD^ HEAD >current && + echo "A elif" >expected && + diff expected current + +' + +test_expect_success 'partial commit that involves removal (2)' ' + + git commit -m "Partial: remove file" file && + git diff-tree --name-status HEAD^ HEAD >current && + echo "D file" >expected && + diff expected current + +' + +test_expect_success 'partial commit that involves removal (3)' ' + + git rm --cached elif && + echo elif >elif && + git commit -m "Partial: modify elif" elif && + git diff-tree --name-status HEAD^ HEAD >current && + echo "M elif" >expected && + diff expected current + +' + test_done |