t5580: verify that alternates can be UNC paths

On Windows, UNC paths are a very convenient way to share data, and alternates are all about sharing data. We fixed a bug where alternates specifying UNC paths were not handled properly, and it is high time that we add a regression test to ensure that this bug is not reintroduced. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Feb 25, 2019 at 06:17 UTC 397a46db786a53db5261a74232447f7b49574bba
1 file changed +12
t/t5580-clone-push-unc.sh
+12
@@ -62,4 +62,16 @@ test_expect_success MINGW 'remote nick cannot contain backslashes' '
62 test_i18ngrep ! "unable to access" err
63 '
64
65 +test_expect_success 'unc alternates' '
66 + tree="$(git rev-parse HEAD:)" &&
67 + mkdir test-unc-alternate &&
68 + (
69 + cd test-unc-alternate &&
70 + git init &&
71 + test_must_fail git show $tree &&
72 + echo "$UNCPATH/.git/objects" >.git/objects/info/alternates &&
73 + git show $tree
74 + )
75 +'
76 +
77 test_done