aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-10 12:35:56 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-10 12:35:56 -0800
commit6a93158c334fae92c5ca969cd0d0725c90af6b54 (patch)
tree985b395452a3d8ceafe0110e42069339b890f219 /t
parenta12e3cf3a2dbe61d2fc68b67d0db7af947795036 (diff)
parent1d46f2ea143534e46e6bfee3f34cd90b734bfe80 (diff)
downloadgit-6a93158c334fae92c5ca969cd0d0725c90af6b54.tar.gz
git-6a93158c334fae92c5ca969cd0d0725c90af6b54.tar.xz
Merge branch 'jk/maint-format-patch-p-suppress-stat'
* jk/maint-format-patch-p-suppress-stat: format-patch: make "-p" suppress diffstat
Diffstat (limited to 't')
-rwxr-xr-xt/t4014-format-patch.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 531f5b795..cab6ce2e9 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -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 &&