diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-09 00:37:23 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-09 00:37:23 +0900 |
commit | f757794d9dbd1152c0a557d3a07617ac2fa5bc09 (patch) | |
tree | 7f43f34e4a1c2d7ed83f473fa0e5dce87f7bdadb /t/t3511-cherry-pick-x.sh | |
parent | Merge branch 'jk/pack-objects-reports-num-objects-to-trace2' (diff) | |
parent | sequencer: fix cleanup with --signoff and -x (diff) | |
download | tgif-f757794d9dbd1152c0a557d3a07617ac2fa5bc09.tar.xz |
Merge branch 'pw/sequencer-cleanup-with-signoff-x-fix'
"git cherry-pick" run with the "-x" or the "--signoff" option used
to (and more importantly, ought to) clean up the commit log message
with the --cleanup=space option by default, but this has been
broken since late 2017. This has been fixed.
* pw/sequencer-cleanup-with-signoff-x-fix:
sequencer: fix cleanup with --signoff and -x
Diffstat (limited to 't/t3511-cherry-pick-x.sh')
-rwxr-xr-x | t/t3511-cherry-pick-x.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t3511-cherry-pick-x.sh b/t/t3511-cherry-pick-x.sh index 9888bf34b9..84a587daf3 100755 --- a/t/t3511-cherry-pick-x.sh +++ b/t/t3511-cherry-pick-x.sh @@ -298,4 +298,24 @@ test_expect_success 'cherry-pick preserves commit message' ' test_cmp expect actual ' +test_expect_success 'cherry-pick -x cleans commit message' ' + pristine_detach initial && + git cherry-pick -x mesg-unclean && + git log -1 --pretty=format:%B >actual && + printf "%s\n(cherry picked from commit %s)\n" \ + "$mesg_unclean" $(git rev-parse mesg-unclean) | + git stripspace >expect && + test_cmp expect actual +' + +test_expect_success 'cherry-pick -x respects commit.cleanup' ' + pristine_detach initial && + git -c commit.cleanup=strip cherry-pick -x mesg-unclean && + git log -1 --pretty=format:%B >actual && + printf "%s\n(cherry picked from commit %s)\n" \ + "$mesg_unclean" $(git rev-parse mesg-unclean) | + git stripspace -s >expect && + test_cmp expect actual +' + test_done |