Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Droneaud <ydroneaud@opteya.com>2013-03-25 01:06:10 +0400
committerJunio C Hamano <gitster@pobox.com>2013-03-25 19:50:54 +0400
commit464be6307c898ff314c723626b5ee61387dab9b4 (patch)
tree8c4c13d7f74a8a428d90e4e8c44e35ba12c5793c /t/t7502-commit.sh
parent5d76ef25d9fedd46c9409af00953c7e8d31ce2ae (diff)
t7502: 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. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-xt/t7502-commit.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index cbd7a45927..3e956506c0 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -171,10 +171,9 @@ test_expect_success 'verbose' '
test_expect_success 'verbose respects diff config' '
- git config color.diff always &&
+ test_config color.diff always &&
git status -v >actual &&
- grep "\[1mdiff --git" actual &&
- git config --unset color.diff
+ grep "\[1mdiff --git" actual
'
test_expect_success 'cleanup commit messages (verbatim option,-t)' '
@@ -518,8 +517,7 @@ use_template="-t template"
try_commit_status_combo
test_expect_success 'commit --status with custom comment character' '
- test_when_finished "git config --unset core.commentchar" &&
- git config core.commentchar ";" &&
+ test_config core.commentchar ";" &&
try_commit --status &&
test_i18ngrep "^; Changes to be committed:" .git/COMMIT_EDITMSG
'