Re: git-clone --config order & fetching extra refs during initial clone

2017-05-08 Thread Junio C Hamano
Jeff King writes: > Actually, it's not too bad, because we can pick up things like > option_origin from the globals. Here it is for reference. The nice thing > about it (IMHO) is that it makes the lifetimes of the helper variables > much more shorter and more clear. > > But I'm OK

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-08 Thread Jeff King
On Mon, May 08, 2017 at 10:10:28PM -0400, Jeff King wrote: > On Tue, May 09, 2017 at 10:33:39AM +0900, Junio C Hamano wrote: > > > >> My patch deals with 'remote..refspec', i.e. 'remote->fetch'. > > >> Apparently some extra care is necessary for 'remote..tagOpt' and > > >> 'remote->fetch_tags',

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-08 Thread Jeff King
On Tue, May 09, 2017 at 10:33:39AM +0900, Junio C Hamano wrote: > >> My patch deals with 'remote..refspec', i.e. 'remote->fetch'. > >> Apparently some extra care is necessary for 'remote..tagOpt' and > >> 'remote->fetch_tags', too. Perhaps there are more, I haven't checked > >> again, and maybe

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-08 Thread Junio C Hamano
Jeff King writes: > Good point. We can't really consider clone to be a blind "init + config > + fetch + checkout" because those middle two steps sometimes overlap > each other. It really does need to be its own beast. > ... > The right solution there is probably pushing that

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-04 Thread Sebastian Schuberth
On 5/3/2017 22:22, Jeff King wrote: >> My patch deals with 'remote..refspec', i.e. 'remote->fetch'. >> Apparently some extra care is necessary for 'remote..tagOpt' and >> 'remote->fetch_tags', too. Perhaps there are more, I haven't checked >> again, and maybe we'll add similar config variables

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-03 Thread Jeff King
On Wed, May 03, 2017 at 04:42:58PM +0200, SZEDER Gábor wrote: > write_refspec_config() nicely encapsulates writing the proper fetch > refspec configuration according to the given command line options. Of > course these options are already known right at the start, so solely > in this regard we

Re: git-clone --config order & fetching extra refs during initial clone

2017-05-03 Thread SZEDER Gábor
Cc'ing Ævar because of his work on 'clone --no-tags'. On Wed, Mar 15, 2017 at 6:08 PM, Jeff King wrote: > On Sat, Mar 11, 2017 at 01:41:34AM +0100, SZEDER Gábor wrote: >> > Though if I'm bikeshedding, I'd probably have written the whole thing >> > with an argv_array and avoided

Re: git-clone --config order & fetching extra refs during initial clone

2017-03-15 Thread Jeff King
On Sat, Mar 11, 2017 at 01:41:34AM +0100, SZEDER Gábor wrote: > >> static struct ref *wanted_peer_refs(const struct ref *refs, > >> - struct refspec *refspec) > >> + struct refspec *refspec, unsigned int refspec_count) > > > > Most of the changes here and elsewhere are

Re: git-clone --config order & fetching extra refs during initial clone

2017-03-10 Thread SZEDER Gábor
On Mon, Feb 27, 2017 at 10:12 PM, Jeff King wrote: > I didn't actually review it very carefully before, but I'll do so now > (spoiler: a few nits, but it looks fine). > >> static struct ref *wanted_peer_refs(const struct ref *refs, >> - struct refspec *refspec) >> +

Re: git-clone --config order & fetching extra refs during initial clone

2017-02-27 Thread Jeff King
On Mon, Feb 27, 2017 at 11:16:35AM -0800, Junio C Hamano wrote: > >> TL;DR: git-clone ignores any fetch specs passed via --config. > > > > I agree that this is a bug. There's some previous discussion and an RFC > > patch from lat March (author cc'd): > > > > > >

Re: git-clone --config order & fetching extra refs during initial clone

2017-02-27 Thread Junio C Hamano
Jeff King writes: > [Re-sending, as I used an old address for Gábor on the original] > > On Sat, Feb 25, 2017 at 07:12:38PM +, Robin H. Johnson wrote: > >> TL;DR: git-clone ignores any fetch specs passed via --config. > > I agree that this is a bug. There's some previous

Re: git-clone --config order & fetching extra refs during initial clone

2017-02-25 Thread Jeff King
[Re-sending, as I used an old address for Gábor on the original] On Sat, Feb 25, 2017 at 07:12:38PM +, Robin H. Johnson wrote: > TL;DR: git-clone ignores any fetch specs passed via --config. I agree that this is a bug. There's some previous discussion and an RFC patch from lat March (author

Re: git-clone --config order & fetching extra refs during initial clone

2017-02-25 Thread Jeff King
On Sat, Feb 25, 2017 at 07:12:38PM +, Robin H. Johnson wrote: > TL;DR: git-clone ignores any fetch specs passed via --config. I agree that this is a bug. There's some previous discussion and an RFC patch from lat March (author cc'd):