diff mbox series

[1/1] t5580: verify that alternates can be UNC paths

Message ID 2c3c559da0a5e9b397f4dc80be233c66b8597678.1551104263.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series t5580: verify that alternates can be UNC paths | expand

Commit Message

John Passaro via GitGitGadget Feb. 25, 2019, 2:17 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

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>
---
 t/t5580-clone-push-unc.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Johannes Schindelin April 29, 2019, 10:52 p.m. UTC | #1
Hi Junio,

gentle ping: this patch was not picked up yet, although it should be
pretty uncontroversial.

Ciao,
Dscho

On Mon, 25 Feb 2019, Johannes Schindelin via GitGitGadget wrote:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> 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>
> ---
>  t/t5580-clone-push-unc.sh | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh
> index 217adf3a63..b3c8a92450 100755
> --- a/t/t5580-clone-push-unc.sh
> +++ b/t/t5580-clone-push-unc.sh
> @@ -62,4 +62,16 @@ test_expect_success MINGW 'remote nick cannot contain backslashes' '
>  	test_i18ngrep ! "unable to access" err
>  '
>
> +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
> --
> gitgitgadget
>
>
Junio C Hamano May 7, 2019, 9:41 a.m. UTC | #2
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Hi Junio,
>
> gentle ping: this patch was not picked up yet, although it should be
> pretty uncontroversial.

Thanks.  It does look it fell through the cracks without sound.
Will pick it up.
diff mbox series

Patch

diff --git a/t/t5580-clone-push-unc.sh b/t/t5580-clone-push-unc.sh
index 217adf3a63..b3c8a92450 100755
--- a/t/t5580-clone-push-unc.sh
+++ b/t/t5580-clone-push-unc.sh
@@ -62,4 +62,16 @@  test_expect_success MINGW 'remote nick cannot contain backslashes' '
 	test_i18ngrep ! "unable to access" err
 '
 
+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