format-patch --notes: show notes after three-dashes
When inserting the note after the commit log message to format-patch output, add three dashes before the note. Record the fact that we did so in the rev_info and omit showing duplicated three dashes in the usual codepath that is used when notes are not being shown. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -623,9 +623,12 @@ test_expect_success 'format-patch --signoff' '
|
||||
test_expect_success 'format-patch --notes --signoff' '
|
||||
git notes --ref test add -m "test message" HEAD &&
|
||||
git format-patch -1 --signoff --stdout --notes=test >out &&
|
||||
# Notes message must come after S-o-b
|
||||
# Three dashes must come after S-o-b
|
||||
! sed "/^Signed-off-by: /q" out | grep "test message" &&
|
||||
sed "1,/^Signed-off-by: /d" out | grep "test message"
|
||||
sed "1,/^Signed-off-by: /d" out | grep "test message" &&
|
||||
# Notes message must come after three dashes
|
||||
! sed "/^---$/q" out | grep "test message" &&
|
||||
sed "1,/^---$/d" out | grep "test message"
|
||||
'
|
||||
|
||||
echo "fatal: --name-only does not make sense" > expect.name-only
|
||||
|
Reference in New Issue
Block a user