]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t4014-format-patch.sh
Merge branch 'jp/fetch-cull-many-refs'
[git.git] / t / t4014-format-patch.sh
index 531f5b795c197d942223db3cdc2d2030208e9beb..cab6ce2e97b2439730915c12b5b141e634e759c5 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 &&