Re: [PATCH v3 09/10] clone: allow --branch to take a tag
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 12 quoted lines
> @@ -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.