summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ed863a)
raw | patch | inline | side by side (parent: 7ed863a)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Wed, 16 Feb 2011 16:55:37 +0000 (17:55 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 17 Feb 2011 19:54:57 +0000 (11:54 -0800) |
Currently, patch-id trips over our very own output that marks the absence
of newline at EOF.
Expose this in a test.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
of newline at EOF.
Expose this in a test.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4204-patch-id.sh | patch | blob | history |
diff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh
index 68e2652814c6a52265407b0fdfb70162eb634d53..db96064f67a8e72ad3f33d9608f8b1d1e9894279 100755 (executable)
--- a/t/t4204-patch-id.sh
+++ b/t/t4204-patch-id.sh
test_cmp patch-id_master patch-id_same
'
+cat >nonl <<\EOF
+diff --git i/a w/a
+index e69de29..2e65efe 100644
+--- i/a
++++ w/a
+@@ -0,0 +1 @@
++a
+\ No newline at end of file
+diff --git i/b w/b
+index e69de29..6178079 100644
+--- i/b
++++ w/b
+@@ -0,0 +1 @@
++b
+EOF
+
+cat >withnl <<\EOF
+diff --git i/a w/a
+index e69de29..7898192 100644
+--- i/a
++++ w/a
+@@ -0,0 +1 @@
++a
+diff --git i/b w/b
+index e69de29..6178079 100644
+--- i/b
++++ w/b
+@@ -0,0 +1 @@
++b
+EOF
+
+test_expect_failure 'patch-id handles no-nl-at-eof markers' '
+ cat nonl | calc_patch_id nonl &&
+ cat withnl | calc_patch_id withnl &&
+ test_cmp patch-id_nonl patch-id_withnl
+'
test_done