]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7513-interpret-trailers.sh
Merge branch 'la/trailer-cleanups' into maint-2.43
[thirdparty/git.git] / t / t7513-interpret-trailers.sh
index 832aff0616736025cb78d2b35e3823594b543b1d..ec9c6de114fddfdb7127434ae17f3ae419164f6c 100755 (executable)
@@ -1916,4 +1916,23 @@ test_expect_success 'suppress --- handling' '
        test_cmp expected actual
 '
 
+test_expect_success 'suppressing --- does not disable cut-line handling' '
+       echo "real-trailer: before the cut" >expected &&
+
+       git interpret-trailers --parse --no-divider >actual <<-\EOF &&
+       subject
+
+       This input has a cut-line in it; we should stop parsing when we see it
+       and consider only trailers before that line.
+
+       real-trailer: before the cut
+
+       # ------------------------ >8 ------------------------
+       # Nothing below this line counts as part of the commit message.
+       not-a-trailer: too late
+       EOF
+
+       test_cmp expected actual
+'
+
 test_done