summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-06-05 09:03:13 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-06-05 09:03:13 +0900
commit00c0e40f020581ff010a3efd96243bf0ae726fb0 (patch)
treeb2da71224902e8bae1834bf1baf91a7dbc34f20a /t
parentMerge branch 'kn/ref-filter-branch-list' into maint (diff)
parentinterpret-trailers: honor the cut line (diff)
downloadtgif-00c0e40f020581ff010a3efd96243bf0ae726fb0.tar.xz
Merge branch 'bm/interpret-trailers-cut-line-is-eom' into maint
"git interpret-trailers", when used as GIT_EDITOR for "git commit -v", looked for and appended to a trailer block at the very end, i.e. at the end of the "diff" output. The command has been corrected to pay attention to the cut-mark line "commit -v" adds to the buffer---the real trailer block should appear just before it. * bm/interpret-trailers-cut-line-is-eom: interpret-trailers: honor the cut line
Diffstat (limited to 't')
-rwxr-xr-xt/t7513-interpret-trailers.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh
index 4dd1d7c520..0c6f91c433 100755
--- a/t/t7513-interpret-trailers.sh
+++ b/t/t7513-interpret-trailers.sh
@@ -1258,4 +1258,21 @@ test_expect_success 'with no command and no key' '
test_cmp expected actual
'
+test_expect_success 'with cut line' '
+ cat >expected <<-\EOF &&
+ my subject
+
+ review: Brian
+ sign: A U Thor <author@example.com>
+ # ------------------------ >8 ------------------------
+ ignore this
+ EOF
+ git interpret-trailers --trailer review:Brian >actual <<-\EOF &&
+ my subject
+ # ------------------------ >8 ------------------------
+ ignore this
+ EOF
+ test_cmp expected actual
+'
+
test_done