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

2012-09-14 Thread Junio C Hamano
Ralf Thielow writes: > + if (option_mirror || !option_bare) { > + strbuf_reset(&value); > + if (option_single_branch) { > + if (option_branch) > + strbuf_addf(&value, "+%s%s:%s%s", > +

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

2012-09-14 Thread Ralf Thielow
After a repo was cloned with the "--single-branch" option, the configured refspec looks like "+refs/heads/*:refs/remotes/origin/*". After fetching from this repo again, it'll receive all refs instead of just the ref from the single branch. Fixing this by configure exactly the ref of the branch the