Based on a bug report by Chad Boles.
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
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