diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-15 15:43:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-15 15:43:44 -0700 |
commit | 633a8bdddf32191ffde532a198f8bb59f4370e26 (patch) | |
tree | 911f4deb06dc173d6718153cd4c07807cc2ae5f1 /t/t3404-rebase-interactive.sh | |
parent | Merge branch 'mm/detach-at-HEAD-reflog' (diff) | |
parent | rebase-i: loosen over-eager check_bad_cmd check (diff) | |
download | tgif-633a8bdddf32191ffde532a198f8bb59f4370e26.tar.xz |
Merge branch 'gr/rebase-i-drop-warn'
"git rebase -i" had a minor regression recently, which stopped
considering a line that begins with an indented '#' in its insn
sheet not a comment, which is now fixed.
* gr/rebase-i-drop-warn:
rebase-i: loosen over-eager check_bad_cmd check
rebase-i: explicitly accept tab as separator in commands
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index d26e3f57dc..3de0b1dcfd 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1227,6 +1227,21 @@ test_expect_success 'static check of bad command' ' test C = $(git cat-file commit HEAD^ | sed -ne \$p) ' +test_expect_success 'tabs and spaces are accepted in the todolist' ' + rebase_setup_and_clean indented-comment && + write_script add-indent.sh <<-\EOF && + ( + # Turn single spaces into space/tab mix + sed "1s/ / /g; 2s/ / /g; 3s/ / /g" "$1" + printf "\n\t# comment\n #more\n\t # comment\n" + ) >$1.new + mv "$1.new" "$1" + EOF + test_set_editor "$(pwd)/add-indent.sh" && + git rebase -i HEAD^^^ && + test E = $(git cat-file commit HEAD | sed -ne \$p) +' + cat >expect <<EOF Warning: the SHA-1 is missing or isn't a commit in the following line: - edit XXXXXXX False commit |