From: Junio C Hamano Date: Wed, 11 Jan 2012 23:57:28 GMT Subject: Re: [PATCH v3 09/10] clone: allow --branch to take a tag Message-ID: <7vboq96bdj.fsf@alter.siamese.dyndns.org> In-Reply-To: <1326189427-20800-10-git-send-email-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > @@ -766,6 +771,14 @@ int cmd_clone(int argc, const char **argv, const char *prefix) > find_ref_by_name(mapped_refs, head.buf); > strbuf_release(&head); > > + if (!our_head_points_at) { > + strbuf_addstr(&head, "refs/tags/"); > + strbuf_addstr(&head, option_branch); > + our_head_points_at = > + find_ref_by_name(mapped_refs, head.buf); > + strbuf_release(&head); > + } > + Ok. I think this makes sense.