diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-18 11:49:11 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-18 11:49:11 -0700 |
commit | 288aa7534ae79eef03f79aaec355a7eedb08ddfa (patch) | |
tree | 5316efce15cad491893eb91fbb87cecb767f0f17 /t/t4014-format-patch.sh | |
parent | 54a3c67375384a38eae946b7996d226dbd9c26d4 (diff) | |
parent | 0597ffa5ecff1b83f384357ab88afaf21838caa2 (diff) | |
download | git-288aa7534ae79eef03f79aaec355a7eedb08ddfa.tar.gz |
Merge branch 'fc/send-email-annotate'
Allows format-patch --cover-letter to be configurable; the most
notable is the "auto" mode to create cover-letter only for multi
patch series.
* fc/send-email-annotate:
rebase-am: explicitly disable cover-letter
format-patch: trivial cleanups
format-patch: add format.coverLetter configuration variable
log: update to OPT_BOOL
format-patch: refactor branch name calculation
format-patch: improve head calculation for cover-letter
send-email: make annotate configurable
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-x | t/t4014-format-patch.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 86ee077107..58d418098d 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1284,4 +1284,37 @@ test_expect_success 'cover letter using branch description (6)' ' grep hello actual >/dev/null ' +test_expect_success 'cover letter with nothing' ' + git format-patch --stdout --cover-letter >actual && + test_line_count = 0 actual +' + +test_expect_success 'cover letter auto' ' + mkdir -p tmp && + test_when_finished "rm -rf tmp; + git config --unset format.coverletter" && + + git config format.coverletter auto && + git format-patch -o tmp -1 >list && + test_line_count = 1 list && + git format-patch -o tmp -2 >list && + test_line_count = 3 list +' + +test_expect_success 'cover letter auto user override' ' + mkdir -p tmp && + test_when_finished "rm -rf tmp; + git config --unset format.coverletter" && + + git config format.coverletter auto && + git format-patch -o tmp --cover-letter -1 >list && + test_line_count = 2 list && + git format-patch -o tmp --cover-letter -2 >list && + test_line_count = 3 list && + git format-patch -o tmp --no-cover-letter -1 >list && + test_line_count = 1 list && + git format-patch -o tmp --no-cover-letter -2 >list && + test_line_count = 2 list +' + test_done |