summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-16 21:32:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-16 21:32:43 (GMT)
commit19d11d43fddd7535c93a616984c3815d5a444f99 (patch)
tree1d44c4e306db3edf58ba281da88a4578a890d442 /t
parentd5fea2418e122c6e1d5dddd57fc8d5dd95adea4e (diff)
parent1db168ee971a6a61ce72480e1db9ddfd3629bfcf (diff)
downloadgit-19d11d43fddd7535c93a616984c3815d5a444f99.zip
git-19d11d43fddd7535c93a616984c3815d5a444f99.tar.gz
git-19d11d43fddd7535c93a616984c3815d5a444f99.tar.bz2
Merge branch 'gr/rebase-i-drop-warn' into maint
"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')
-rwxr-xr-xt/t3404-rebase-interactive.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index d26e3f5..3de0b1d 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