t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings
Based on a bug report by Chad Boles. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Oct 28, 2015 at 15:54 UTC
1db25aae5ef7c518b46a9f5b30f317e882ac505a
1 file changed
+12
t/t3404-rebase-interactive.sh
+12
@@ -1240,4 +1240,16 @@ test_expect_success 'static check of bad SHA-1' '
1240
test E = $(git cat-file commit HEAD | sed -ne \$p)
1241
'
1242
1243
+test_expect_failure 'editor saves as CR/LF' '
1244
+ git checkout -b with-crlf &&
1245
+ write_script add-crs.sh <<-\EOF &&
1246
+ sed -e "s/\$/Q/" <"$1" | tr Q "\\015" >"$1".new &&
1247
+ mv -f "$1".new "$1"
1248
+ EOF
1249
+ (
1250
+ test_set_editor "$(pwd)/add-crs.sh" &&
1251
+ git rebase -i HEAD^
1252
+ )
1253
+'
1254
+
1255
test_done