]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t4014-format-patch.sh
Merge branch 'bg/maint-add-all-doc' into maint-1.6.5
[git.git] / t / t4014-format-patch.sh
index 437807e41ecf3fbde2b1b717960b4a384bc66bab..74e5b63bbf7895f383323917c614679afd2d29b1 100755 (executable)
@@ -455,6 +455,27 @@ test_expect_success 'format-patch respects -U' '
 
 '
 
+cat > expect << EOF
+
+diff --git a/file b/file
+index 40f36c6..2dc5c23 100644
+--- a/file
++++ b/file
+@@ -14,3 +14,19 @@ C
+ D
+ E
+ F
++5
+EOF
+
+test_expect_success 'format-patch -p suppresses stat' '
+
+       git format-patch -p -2 &&
+       sed -e "1,/^$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
+       test_cmp expect output
+
+'
+
 test_expect_success 'format-patch from a subdirectory (1)' '
        filename=$(
                rm -rf sub &&