Re: [PATCH] add --remote option to git-clone.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 5 Feb 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> >
> > 	git clone git://.../git.git#html
> >
> > to mean "just fetch the branch html, and check it out".
> 
> Except that I do not particularly think the URL fragment
> notation is such a "cool" syntax.

I think the cogito '#'<branch> syntax is braindead.

Much better to use native git syntax, which is to just list the branch 
separately. Why? Not only is it the way we do things for pull and friends, 
it's also what allows us to specify *multiple* branches.

So I would personally welcome a "clone just a particular branch", but in 
that case I'd like it to be able to say more than one too..

(In general, even if I clone _everything_, I'd also like to perhaps set 
the default 'master' branch to track something else than what I'm cloning 
from. In fact, I think I'd generally prefer cloning everything, but 
sometimes I'd like to say "I'm going to track the upstreams branch xyzzy 
rather than their default branch").

I realize that the

	git clone <repo> [<dir>]

means that we can't have the same syntax as "git pull" (which doesn't take 
the <dir> part), but that doesn't make the "#branch" syntax any better.

So I much prefer the

	git clone [--default branch] [--branch x]* <repo> [<dir>

kind of syntax.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]