Skip to content

Commit 1db25aa

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1db168e commit 1db25aa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t3404-rebase-interactive.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,4 +1240,16 @@ test_expect_success 'static check of bad SHA-1' '
12401240
test E = $(git cat-file commit HEAD | sed -ne \$p)
12411241
'
12421242

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+
12431255
test_done

0 commit comments

Comments
 (0)