summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-17 23:25:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-17 23:25:20 (GMT)
commit00abd715ab0a2cd69f9d27ea15c5440002f970b8 (patch)
treea7796507c57503b530b376bc79724d13386f1f2d /t/t3404-rebase-interactive.sh
parentd04f998b12503f3efb859163355c7c2ee3f5b78f (diff)
parent180bad3d10fe3a7f6d6c990956a888dd0562bef1 (diff)
downloadgit-00abd715ab0a2cd69f9d27ea15c5440002f970b8.zip
git-00abd715ab0a2cd69f9d27ea15c5440002f970b8.tar.gz
git-00abd715ab0a2cd69f9d27ea15c5440002f970b8.tar.bz2
Merge branch 'jk/rebase-i-comment-char'
Finishing touches to the earlier core.commentchar topic to cover "rebase -i" as well. * jk/rebase-i-comment-char: rebase -i: respect core.commentchar
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 8462be1..15dcbd4 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -934,4 +934,18 @@ test_expect_success 'rebase --edit-todo can be used to modify todo' '
test L = $(git cat-file commit HEAD | sed -ne \$p)
'
+test_expect_success 'rebase -i respects core.commentchar' '
+ git reset --hard &&
+ git checkout E^0 &&
+ git config core.commentchar "\\" &&
+ test_when_finished "git config --unset core.commentchar" &&
+ write_script remove-all-but-first.sh <<-\EOF &&
+ sed -e "2,\$s/^/\\\\/" "$1" >"$1.tmp" &&
+ mv "$1.tmp" "$1"
+ EOF
+ test_set_editor "$(pwd)/remove-all-but-first.sh" &&
+ git rebase -i B &&
+ test B = $(git cat-file commit HEAD^ | sed -ne \$p)
+'
+
test_done