diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2015-10-28 15:54:21 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-28 10:01:59 -0700 |
commit | 1db25aae5ef7c518b46a9f5b30f317e882ac505a (patch) | |
tree | 70bfe544e305cee376b3030a1d0d8f33e3fa13f6 /t/t3404-rebase-interactive.sh | |
parent | 1db168ee971a6a61ce72480e1db9ddfd3629bfcf (diff) | |
download | git-1db25aae5ef7c518b46a9f5b30f317e882ac505a.tar.gz git-1db25aae5ef7c518b46a9f5b30f317e882ac505a.tar.xz |
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>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 88d7d5358..65474dc13 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -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 |