git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] t5501-*.sh: Fix url passed to clone in setup test
@ 2011-11-19 19:38 Ramsay Jones
  2011-11-21  3:24 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2011-11-19 19:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/3] t5501-*.sh: Fix url passed to clone in setup test
  2011-11-19 19:38 [PATCH 1/3] t5501-*.sh: Fix url passed to clone in setup test Ramsay Jones
@ 2011-11-21  3:24 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2011-11-21  3:24 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: GIT Mailing-list

Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:

> 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>
> ---

Thanks; obviously correct.


>  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 &&

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-21  3:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 19:38 [PATCH 1/3] t5501-*.sh: Fix url passed to clone in setup test Ramsay Jones
2011-11-21  3:24 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).