From: Junio C Hamano <gitster@pobox.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix clone to setup the origin if its name ends with .git
Date: Wed, 06 Jun 2007 19:08:28 -0700 [thread overview]
Message-ID: <7vejkott2b.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070606224906.GB3969@steel.home> (Alex Riesen's message of "Thu, 7 Jun 2007 00:49:06 +0200")
Alex Riesen <raa.lkml@gmail.com> writes:
> The problem is visible when cloning a local repo. The cloned
> repository will have the origin url setup incorrectly: the origin name
> will be copied verbatim in origin url of the cloned repository.
> Normally, the name is to be expanded into absolute path.
Thanks.
> diff --git a/git-clone.sh b/git-clone.sh
> index fdd354f..d45618d 100755
> --- a/git-clone.sh
> +++ b/git-clone.sh
> @@ -20,7 +20,7 @@ usage() {
> get_repo_base() {
> (
> cd "`/bin/pwd`" &&
> - cd "$1" &&
> + cd "$1" || cd "$1.git" &&
> {
> cd .git
> pwd
We would probably need a to clean up this test a bit, though.
When we write our tests, we tend to forget testing the cases
where things ought to fail.
I'll probably redo the test myself, but for the record...
- Please never "unset" GIT_CONFIG. We do not want the tests to
get affected with /etc/gitconfig or $HOME/.gitconfig;
- We would also want to test the cases where a bare repository
x exists and x.git does not, and try cloning it into y and z
respectively. Obviously the former should work and the
latter should fail.
prev parent reply other threads:[~2007-06-07 2:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-06 22:49 [PATCH] Fix clone to setup the origin if its name ends with .git Alex Riesen
2007-06-07 2:08 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vejkott2b.fsf@assigned-by-dhcp.cox.net \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.