summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2013-02-11 23:08:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-02-12 20:01:42 (GMT)
commit180bad3d10fe3a7f6d6c990956a888dd0562bef1 (patch)
tree99fdec2df6a43da35844cb3cdc2b16303020272f /t/t3404-rebase-interactive.sh
parenteff80a9fd990de3605063050dae32f969ef18ba8 (diff)
downloadgit-180bad3d10fe3a7f6d6c990956a888dd0562bef1.zip
git-180bad3d10fe3a7f6d6c990956a888dd0562bef1.tar.gz
git-180bad3d10fe3a7f6d6c990956a888dd0562bef1.tar.bz2
rebase -i: respect core.commentchar
Commit eff80a9 (Allow custom "comment char") introduced a custom comment character for commit messages but did not teach git-rebase--interactive to use it. Change git-rebase--interactive to read core.commentchar and use its value when generating commit messages and for the command list. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 32fdc99..8b3e2cd 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -940,4 +940,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