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

[PATCH 1/3] t5501-*.sh: Fix url passed to clone in setup test

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 19, 2011, 19:38 UTC
Message-ID
<4EC805CE.10203@ramsay1.demon.co.uk>

In particular, the url passed to git-clone has an extra '/' given after the 'file://' schema prefix, thus:

    git clone --reference=original "file:///$(pwd)/original one

Once the prefix is removed, the remainder of the url looks something like "//home/ramsay/git/t/...", which is then interpreted as an network path. This then results in a "Permission denied" error, like so:

    ramsay $ ls //home
    ls: cannot access //home: No such host or network path
    ramsay $ ls //home/ramsay
    ls: cannot access //home/ramsay: Permission denied
    ramsay $

In order to fix the problem, we simply remove the extraneous '/' character from the url.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 t/t5501-fetch-push-alternates.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/t5501-fetch-push-alternates.sh b/t/t5501-fetch-push-alternates.sh
index b5ced84..1bc57ac 100755
--- a/t/t5501-fetch-push-alternates.sh
+++ b/t/t5501-fetch-push-alternates.sh
@@ -28,7 +28,7 @@ test_expect_success setup '
 		done
 	) &&
 	(
-		git clone --reference=original "file:///$(pwd)/original" one &&
+		git clone --reference=original "file://$(pwd)/original" one &&
 		cd one &&
 		echo Z >count &&
 		git add count &&
-- 
1.7.7
Next: Junio C Hamano
Message 1 of 2 in “t5501-*.sh: Fix url passed to clone in setup test”
  1. 1/3 t5501-*.sh: Fix url passed to clone in setup testRamsay Jones, Nov 19, 2011
  2. Junio C HamanoNov 21, 2011

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.