Merge branch 'jk/upload-pack-hook'
authorJunio C Hamano <gitster@pobox.com>
Thu, 14 Jul 2016 17:38:57 +0000 (10:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jul 2016 17:38:57 +0000 (10:38 -0700)
A hot-fix to make a test working in mingw again.

* jk/upload-pack-hook:
mingw: fix regression in t1308-config-set

t/t1308-config-set.sh
index a06e71ceeda8261dc7773d24f5f264ee6bdc2893..7655c94c2801f0070a7b60ea17f30414b16c8d12 100755 (executable)
@@ -233,11 +233,19 @@ cmdline_config="'foo.bar=from-cmdline'"
 test_expect_success 'iteration shows correct origins' '
        echo "[foo]bar = from-repo" >.git/config &&
        echo "[foo]bar = from-home" >.gitconfig &&
+       if test_have_prereq MINGW
+       then
+               # Use Windows path (i.e. *not* $HOME)
+               HOME_GITCONFIG=$(pwd)/.gitconfig
+       else
+               # Do not get fooled by symbolic links, i.e. $HOME != $(pwd)
+               HOME_GITCONFIG=$HOME/.gitconfig
+       fi &&
        cat >expect <<-EOF &&
        key=foo.bar
        value=from-home
        origin=file
-       name=$HOME/.gitconfig
+       name=$HOME_GITCONFIG
        scope=global
 
        key=foo.bar