From: Junio C Hamano Date: Fri, 14 Sep 2012 22:45:54 GMT Subject: Re: [PATCHv3] clone: fix refspec on "--single-branch" option Message-ID: <7vy5kc1avx.fsf@alter.siamese.dyndns.org> In-Reply-To: <1347657228-16404-1-git-send-email-ralf.thielow@gmail.com> 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", > + src_ref_prefix, option_branch, > + branch_top.buf, option_branch); > + else if (remote_head_points_at) > + strbuf_addf(&value, "+%s:%s%s", > + remote_head_points_at->name, branch_top.buf, > + skip_prefix(remote_head_points_at->name, "refs/heads/")); We have already set "remote.origin.url" to this repository, so the next "git fetch" would simply fetch from "HEAD" per default. Perhaps worth commenting that here? Other than that, looks good. Perhaps we would want a test or two, too? Thanks.