summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-08-03 11:01:16 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-08-03 11:01:16 -0700
commit9f56db7cafc6a4634b8f2fa70f1c8949f4242df1 (patch)
treefd06c818321ff5a01174b2ce7bd5c25cafa529c5 /t
parentMerge branch 'rl/send-email-aliases' (diff)
parentgit-rebase--interactive.sh: add config option for custom instruction format (diff)
downloadtgif-9f56db7cafc6a4634b8f2fa70f1c8949f4242df1.tar.xz
Merge branch 'mr/rebase-i-customize-insn-sheet'
"git rebase -i"'s list of todo is made configurable. * mr/rebase-i-customize-insn-sheet: git-rebase--interactive.sh: add config option for custom instruction format
Diffstat (limited to 't')
-rwxr-xr-xt/t3415-rebase-autosquash.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh
index 41370ab998..8f53e54ce4 100755
--- a/t/t3415-rebase-autosquash.sh
+++ b/t/t3415-rebase-autosquash.sh
@@ -250,4 +250,25 @@ test_expect_success 'squash! fixup!' '
test_auto_fixup_fixup squash fixup
'
+test_expect_success 'autosquash with custom inst format' '
+ git reset --hard base &&
+ git config --add rebase.instructionFormat "[%an @ %ar] %s" &&
+ echo 2 >file1 &&
+ git add -u &&
+ test_tick &&
+ git commit -m "squash! $(git rev-parse --short HEAD^)" &&
+ echo 1 >file1 &&
+ git add -u &&
+ test_tick &&
+ git commit -m "squash! $(git log -n 1 --format=%s HEAD~2)" &&
+ git tag final-squash-instFmt &&
+ test_tick &&
+ git rebase --autosquash -i HEAD~4 &&
+ git log --oneline >actual &&
+ test_line_count = 3 actual &&
+ git diff --exit-code final-squash-instFmt &&
+ test 1 = "$(git cat-file blob HEAD^:file1)" &&
+ test 2 = $(git cat-file commit HEAD^ | grep squash | wc -l)
+'
+
test_done