summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorYann Droneaud <ydroneaud@opteya.com>2013-03-24 21:06:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-03-25 15:50:53 (GMT)
commitaac6c2f4bcea6bd371ef8b25edb991673a14d5b3 (patch)
tree0535dc3cc28a8b7275a639871dc0602196d731bd /t/t3404-rebase-interactive.sh
parent55adef06506b27c3f8d9e16c77bdf4e2e83678e9 (diff)
downloadgit-aac6c2f4bcea6bd371ef8b25edb991673a14d5b3.zip
git-aac6c2f4bcea6bd371ef8b25edb991673a14d5b3.tar.gz
git-aac6c2f4bcea6bd371ef8b25edb991673a14d5b3.tar.bz2
t4304: use test_config to set/unset git config variables
Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Tests are modified to assume correct (default) configuration at entry, and to reset the modified configuration variables at the end. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 15dcbd4..a58406d 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -937,8 +937,7 @@ test_expect_success 'rebase --edit-todo can be used to modify todo' '
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" &&
+ test_config core.commentchar "\\" &&
write_script remove-all-but-first.sh <<-\EOF &&
sed -e "2,\$s/^/\\\\/" "$1" >"$1.tmp" &&
mv "$1.tmp" "$1"