From b079feed64238558fa24ba8ade892d84628a05ac Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Fri, 12 Mar 2010 18:04:30 +0100 Subject: rebase -i: invoke post-rewrite hook Aside from the same issue that rebase also has (remembering the original commit across a conflict resolution), rebase -i brings an extra twist: We need to defer writing the rewritten list in the case of {squash,fixup} because their rewritten result should be the last commit in the squashed group. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- t/t5407-post-rewrite-hook.sh | 101 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) (limited to 't/t5407-post-rewrite-hook.sh') diff --git a/t/t5407-post-rewrite-hook.sh b/t/t5407-post-rewrite-hook.sh index 1ecaa4b580..f0f91f149d 100755 --- a/t/t5407-post-rewrite-hook.sh +++ b/t/t5407-post-rewrite-hook.sh @@ -79,4 +79,105 @@ EOF verify_hook_input ' +test_expect_success 'git rebase -m' ' + git reset --hard D && + clear_hook_input && + test_must_fail git rebase -m --onto A B && + echo C > foo && + git add foo && + git rebase --continue && + echo rebase >expected.args && + cat >expected.data < foo && + git add foo && + git rebase --continue && + echo rebase >expected.args && + cat >expected.data < foo && + git add foo && + git rebase --continue && + echo rebase >expected.args && + cat >expected.data < foo && + git add foo && + git rebase --continue && + echo rebase >expected.args && + cat >expected.data < foo && + git add foo && + git rebase --continue && + echo rebase >expected.args && + cat >expected.data <expected.args && + cat >expected.data <