From: Junio C Hamano Date: Sun, 16 Oct 2011 03:46:37 +0000 (-0700) Subject: Merge branch 'tr/mergetool-valgrind' into maint X-Git-Tag: v1.7.7.1~20 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8f858299b585e4be0648432a78a94b0260b3ad86?ds=inline;hp=-c Merge branch 'tr/mergetool-valgrind' into maint * tr/mergetool-valgrind: Symlink mergetools scriptlets into valgrind wrappers --- 8f858299b585e4be0648432a78a94b0260b3ad86 diff --combined t/test-lib.sh index d7dfc8b0b1,c210c17c29..bdd9513b84 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -361,24 -361,6 +361,24 @@@ test_chmod () git update-index --add "--chmod=$@" } +# Unset a configuration variable, but don't fail if it doesn't exist. +test_unconfig () { + git config --unset-all "$@" + config_status=$? + case "$config_status" in + 5) # ok, nothing to unset + config_status=0 + ;; + esac + return $config_status +} + +# Set git config, automatically unsetting it after the test is over. +test_config () { + test_when_finished "test_unconfig '$1'" && + git config "$@" +} + # Use test_set_prereq to tell that a particular prerequisite is available. # The prerequisite can later be checked for in two ways: # @@@ -950,6 -932,8 +950,8 @@@ the do make_valgrind_symlink $file done + # special-case the mergetools loadables + make_symlink "$GIT_BUILD_DIR"/mergetools "$GIT_VALGRIND/bin/mergetools" OLDIFS=$IFS IFS=: for path in $PATH