Teach git mergetool to use custom commands defined at config time
[gitweb.git] / t / test-lib.sh
index 90df619b9f67374c76ec7506836b78bd2c264cc7..87a5ea4a6a54d712c0973cd9b8090c3ec83fb828 100644 (file)
@@ -80,7 +80,7 @@ do
        -q|--q|--qu|--qui|--quie|--quiet)
                quiet=t; shift ;;
        --no-color)
-           color=; shift ;;
+               color=; shift ;;
        --no-python)
                # noop now...
                shift ;;
@@ -142,7 +142,12 @@ test_count=0
 test_fixed=0
 test_broken=0
 
-trap 'echo >&5 "FATAL: Unexpected exit with code $?"; exit 1' exit
+die () {
+       echo >&5 "FATAL: Unexpected exit with code $?"
+       exit 1
+}
+
+trap 'die' exit
 
 test_tick () {
        if test -z "${test_tick+set}"
@@ -359,6 +364,8 @@ if ! test -x ../test-chmtime; then
        exit 1
 fi
 
+. ../GIT-BUILD-OPTIONS
+
 # Test repository
 test=trash
 rm -fr "$test"