From: Junio C Hamano Date: Wed, 5 Oct 2011 19:35:53 +0000 (-0700) Subject: Merge branch 'tr/mergetool-valgrind' X-Git-Tag: v1.7.8-rc0~153 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c4800a3b7731a4dc0274736403e8202ce3346f04?hp=-c Merge branch 'tr/mergetool-valgrind' * tr/mergetool-valgrind: Symlink mergetools scriptlets into valgrind wrappers --- c4800a3b7731a4dc0274736403e8202ce3346f04 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