Re: [PATCH] clone: fix refspec on "--single-branch" option

2012-09-13 Thread Junio C Hamano
Ralf Thielow writes: > After using "git clone" with the "--single-branch" > option, the configured refspec for this repo was > "+refs/heads/*:refs/remotes/origin/*". > After fetching changes from this repo again, it'll > receive all refs instead of the single ref which > was used in "--single-bra

Re: [PATCH] clone: fix refspec on "--single-branch" option

2012-09-13 Thread Junio C Hamano
Junio C Hamano writes: > Who guarantees at this point in the codepath that option_branch is > set when option_single_branch is non-zero? Until we talk with the > remote, "clone --single-branch" without an explicit "--branch" will > not learn which branch at the remote we are going to fetch (it w

Re: [PATCH] clone: fix refspec on "--single-branch" option

2012-09-14 Thread Nguyen Thai Ngoc Duy
On Fri, Sep 14, 2012 at 1:48 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Who guarantees at this point in the codepath that option_branch is >> set when option_single_branch is non-zero? Until we talk with the >> remote, "clone --single-branch" without an explicit "--branch" will >> n

Re: [PATCH] clone: fix refspec on "--single-branch" option

2012-09-14 Thread Ralf Thielow
On Fri, Sep 14, 2012 at 3:10 PM, Nguyen Thai Ngoc Duy wrote: > On Fri, Sep 14, 2012 at 1:48 PM, Junio C Hamano wrote: >> Junio C Hamano writes: >> >>> Who guarantees at this point in the codepath that option_branch is >>> set when option_single_branch is non-zero? Until we talk with the >>> rem

Re: [PATCH] clone: fix refspec on "--single-branch" option

2012-09-14 Thread Junio C Hamano
Nguyen Thai Ngoc Duy writes: > On Fri, Sep 14, 2012 at 1:48 PM, Junio C Hamano wrote: > >> Alternatively, if you can move the logic to set up this >> configuration further down so that it happens after we talked to the >> other side and figured out remote_head_points_at, you could instead >> set

Re: [PATCH] clone: fix refspec on "--single-branch" option

2012-09-14 Thread Junio C Hamano
Junio C Hamano writes: > Alternatively, if you can move the logic to set up this > configuration further down so that it happens after we talked to the > other side and figured out remote_head_points_at, you could instead > set it up to keep a single remote tracking branch. > > Even if you did so