git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Feb 25, 2019, 14:17 UTC
Message-ID
<2c3c559da0a5e9b397f4dc80be233c66b8597678.1551104263.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.140.git.gitgitgadget@gmail.com>
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
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin
Message 2 of 4 in “t5580: verify that alternates can be UNC paths”
  1. 0/1 t5580: verify that alternates can be UNC pathsJohannes Schindelin via GitGitGadget, Feb 25, 2019
  2. 1/1 t5580: verify that alternates can be UNC pathsJohannes Schindelin via GitGitGadget, Feb 25, 2019
  3. Johannes SchindelinApr 29, 2019
  4. Junio C HamanoMay 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.