diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-28 12:32:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-28 12:32:17 -0700 |
commit | 483c9b8602eb2f4261d135c4332c4c48fa7eb8f6 (patch) | |
tree | c5c7bacbc8e7c6c4df31ef1ae4edc03fe72015b8 /t/t7513-interpret-trailers.sh | |
parent | 038226ebc6ec1b82af639fa1d943684c07dd8f72 (diff) | |
parent | 6262fe9ca3cd61d27ca5c5599ab46d166e5b23a2 (diff) | |
download | git-483c9b8602eb2f4261d135c4332c4c48fa7eb8f6.tar.gz |
Merge branch 'cc/trailers-corner-case-fix'
"interpret-trailers" helper mistook a single-liner log message that
has a colon as the end of existing trailer.
* cc/trailers-corner-case-fix:
trailer: retitle a test and correct an in-comment message
trailer: ignore first line of message
Diffstat (limited to 't/t7513-interpret-trailers.sh')
-rwxr-xr-x | t/t7513-interpret-trailers.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index bd0ab46750..9577b4effb 100755 --- a/t/t7513-interpret-trailers.sh +++ b/t/t7513-interpret-trailers.sh @@ -93,12 +93,25 @@ test_expect_success 'with config option on the command line' ' Acked-by: Johan Reviewed-by: Peff EOF - echo "Acked-by: Johan" | + { echo; echo "Acked-by: Johan"; } | git -c "trailer.Acked-by.ifexists=addifdifferent" interpret-trailers \ --trailer "Reviewed-by: Peff" --trailer "Acked-by: Johan" >actual && test_cmp expected actual ' +test_expect_success 'with only a title in the message' ' + cat >expected <<-\EOF && + area: change + + Reviewed-by: Peff + Acked-by: Johan + EOF + echo "area: change" | + git interpret-trailers --trailer "Reviewed-by: Peff" \ + --trailer "Acked-by: Johan" >actual && + test_cmp expected actual +' + test_expect_success 'with config setup' ' git config trailer.ack.key "Acked-by: " && cat >expected <<-\EOF && |