diff options
author | Michael Rappazzo <rappazzo@gmail.com> | 2015-06-13 12:26:58 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-15 11:42:58 -0700 |
commit | 16cf51c7a2e82f27577bb1bdcdc013c34815803e (patch) | |
tree | 3401b5762913fc10a6297ec6ca4511f7df4e12b0 /t/t3415-rebase-autosquash.sh | |
parent | 7974889a053574e449b55ca543a486e38e74864f (diff) | |
download | git-16cf51c7a2e82f27577bb1bdcdc013c34815803e.tar.gz |
git-rebase--interactive.sh: add config option for custom instruction formatmr/rebase-i-customize-insn-sheet
A config option 'rebase.instructionFormat' can override the
default 'oneline' format of the rebase instruction list.
Since the list is parsed using the left, right or boundary mark plus
the sha1, they are prepended to the instruction format.
Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3415-rebase-autosquash.sh')
-rwxr-xr-x | t/t3415-rebase-autosquash.sh | 21 |
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 |