diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-09-01 11:26:28 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-09-01 11:26:28 -0700 |
| commit | 3b4e395cb3ed2170da1fe2f340f54bc742351f92 (patch) | |
| tree | 3ec4d8f59f735c56437c76086a217f70700eeeeb /t | |
| parent | f137bd4358bba70cede3e3198cbd50fd656b70a9 (diff) | |
| parent | 67f4b36e339d91c06ff9cdc254864c830158e10f (diff) | |
| download | git-3b4e395cb3ed2170da1fe2f340f54bc742351f92.tar.xz | |
Merge branch 'ob/format-patch-description-file'
"git format-patch" learns a way to feed cover letter description,
that (1) can be used on detached HEAD where there is no branch
description available, and (2) also can override the branch
description if there is one.
* ob/format-patch-description-file:
format-patch: add --description-file option
Diffstat (limited to 't')
| -rwxr-xr-x | t/t4014-format-patch.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 3cf2b7a7fb..bc0e29b31a 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -1991,6 +1991,20 @@ test_expect_success 'cover letter using branch description (6)' ' grep hello actual ' +test_expect_success 'cover letter with --description-file' ' + test_when_finished "rm -f description.txt" && + cat >description.txt <<-\EOF && + subject from file + + body from file + EOF + git checkout rebuild-1 && + git format-patch --stdout --cover-letter --cover-from-description auto \ + --description-file description.txt main >actual && + grep "^Subject: \[PATCH 0/2\] subject from file$" actual && + grep "^body from file$" actual +' + test_expect_success 'cover letter with nothing' ' git format-patch --stdout --cover-letter >actual && test_line_count = 0 actual |
