Skip to content

Commit

Permalink
t3404: "rebase -i" gets broken when insn sheet uses CR/LF line endings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Oct 28, 2015
1 parent 1db168e commit 1db25aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/t3404-rebase-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1240,4 +1240,16 @@ test_expect_success 'static check of bad SHA-1' '
test E = $(git cat-file commit HEAD | sed -ne \$p)
'

test_expect_failure 'editor saves as CR/LF' '
git checkout -b with-crlf &&
write_script add-crs.sh <<-\EOF &&
sed -e "s/\$/Q/" <"$1" | tr Q "\\015" >"$1".new &&
mv -f "$1".new "$1"
EOF
(
test_set_editor "$(pwd)/add-crs.sh" &&
git rebase -i HEAD^
)
'

test_done

0 comments on commit 1db25aa

Please sign in to comment.