diff options
Diffstat (limited to 't/t3406-rebase-message.sh')
-rwxr-xr-x | t/t3406-rebase-message.sh | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/t/t3406-rebase-message.sh b/t/t3406-rebase-message.sh index 5391080943..6898377910 100755 --- a/t/t3406-rebase-message.sh +++ b/t/t3406-rebase-message.sh @@ -22,7 +22,8 @@ test_expect_success setup ' git checkout topic && quick_one A && quick_one B && - quick_one Z + quick_one Z && + git tag start ' @@ -41,4 +42,29 @@ test_expect_success 'rebase -m' ' ' +test_expect_success 'rebase --stat' ' + git reset --hard start && + git rebase --stat master >diffstat.txt && + grep "^ fileX | *1 +$" diffstat.txt +' + +test_expect_success 'rebase w/config rebase.stat' ' + git reset --hard start && + git config rebase.stat true && + git rebase master >diffstat.txt && + grep "^ fileX | *1 +$" diffstat.txt +' + +test_expect_success 'rebase -n overrides config rebase.stat config' ' + git reset --hard start && + git config rebase.stat true && + git rebase -n master >diffstat.txt && + ! grep "^ fileX | *1 +$" diffstat.txt +' + +test_expect_success 'rebase --onto outputs the invalid ref' ' + test_must_fail git rebase --onto invalid-ref HEAD HEAD 2>err && + grep "invalid-ref" err +' + test_done |