Skip to content

Commit

Permalink
t5580: verify that alternates can be UNC paths
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dscho committed Feb 4, 2017
1 parent 35059b1 commit 8cd39f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/t5580-clone-push-unc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,16 @@ test_expect_success push '
test "$rev" = "$(git rev-parse --verify refs/heads/to-push)"
'

test_expect_success 'unc alternates' '
tree="$(git rev-parse HEAD:)" &&
mkdir test-unc-alternate &&
(
cd test-unc-alternate &&
git init &&
test_must_fail git show $tree &&
echo "$UNCPATH/.git/objects" >.git/objects/info/alternates &&
git show $tree
)
'

test_done

0 comments on commit 8cd39f7

Please sign in to comment.