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 gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com 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

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 pclo...@gmail.com wrote: On Fri, Sep 14, 2012 at 1:48 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Who guarantees at this point in the codepath that option_branch is set when option_single_branch is

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

2012-09-14 Thread Junio C Hamano
Nguyen Thai Ngoc Duy pclo...@gmail.com writes: On Fri, Sep 14, 2012 at 1:48 PM, Junio C Hamano gits...@pobox.com 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

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

2012-09-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com 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

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

2012-09-13 Thread Ralf Thielow
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-branch. Fixing the refspec that it just

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

2012-09-13 Thread Junio C Hamano
Ralf Thielow ralf.thie...@gmail.com 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