Re: [PATCH v2] Add --track option to git clone
- From
Nanako Shiraishi <nanako3@lavabit.com>
- Date
- Dec 2, 2009, 21:07 UTC
- Message-ID
- <20091203060708.6117@nanako3.lavabit.com>
- In-Reply-To
- <20091202190807.GB30778@coredump.intra.peff.net>
Quoting Jeff King <peff@peff.net>
> I would find something like this useful for cloning git.git, where I > explicitly fetch maint, master, next, and pu, but none of html, man, or > todo. This makes "gitk --all" much nicer to view.
Thank you for explaining. I now can understand why it can be useful.
> # most general case > git clone -f 'refs/heads/subset/*:refs/remotes/origin/*' remote.git
Because this is only about branches and no other kinds of references, I think this is an overkill.
> git clone -f 'subset/*' remote.git
But I think this is a good idea.
Show 7 quoted lines
> # multiple -f should add multiple refspec lines > git clone -f maint -f master -f next -f pu git.git > > # choose your favorite branch > git clone -f maint -f master -f next -f pu -b next git.git > ... > What do you think?
I think your rule to make first branch given by -f the default for -b is a good idea. But I'm not very happy with the example with four -f. Can we probably write it like this?
git clone -f maint,master,next,pu git.git
If it isn't a good idea to use comma, we can use colon to split the list of branch names instead.
-- Nanako Shiraishi http://ivory.ap.teacup.com/nanako3/