Code

Merge branch 'tr/mergetool-valgrind' into maint
authorJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 03:46:37 +0000 (20:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 03:46:37 +0000 (20:46 -0700)
* tr/mergetool-valgrind:
  Symlink mergetools scriptlets into valgrind wrappers

1  2 
t/test-lib.sh

diff --combined t/test-lib.sh
index d7dfc8b0b1939180f16b8245e58465f883e85cbc,c210c17c2979565b66380f39f8b38fd9fa848a69..bdd9513b84301275330d3dd7e49af05081ef9cd7
@@@ -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