Skip to content

Commit ca10ac7

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 <[email protected]>
1 parent 02b5e0b commit ca10ac7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t5580-clone-push-unc.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,16 @@ test_expect_success push '
4545
test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
4646
'
4747

48+
test_expect_success 'unc alternates' '
49+
tree="$(git rev-parse HEAD:)" &&
50+
mkdir test-unc-alternate &&
51+
(
52+
cd test-unc-alternate &&
53+
git init &&
54+
test_must_fail git show $tree &&
55+
echo "$UNCPATH/.git/objects" >.git/objects/info/alternates &&
56+
git show $tree
57+
)
58+
'
59+
4860
test_done

0 commit comments

Comments
 (0)