interpret-trailers: add an option to show only existing trailers
[gitweb.git] / t / t7513-interpret-trailers.sh
index 90d30037b7b38397123a080c8d70df4de894066f..94b6c52473e3a9862d7b4107796b45cbd6cf755d 100755 (executable)
@@ -1314,4 +1314,20 @@ test_expect_success 'only-trailers omits non-trailer in middle of block' '
        test_cmp expected actual
 '
 
+test_expect_success 'only input' '
+       git config trailer.sign.command "echo config-value" &&
+       cat >expected <<-\EOF &&
+               existing: existing-value
+       EOF
+       git interpret-trailers \
+               --only-trailers --only-input >actual <<-\EOF &&
+               my subject
+
+               my body
+
+               existing: existing-value
+       EOF
+       test_cmp expected actual
+'
+
 test_done