Re: [PATCH] Add option -b/--branch to clone for select a new HEAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009.08.26 12:10:59 -0400, Jeff King wrote:
> So I think the code should probably look like this (totally untested):
> 
>   remote_head = find_ref_by_name(refs, "HEAD");
>   if (option_branch) {
>           strbuf_addf(&branch_head, "%s%s", src_ref_prefix, option_branch);
>           head_points_at = find_ref_by_name(refs, branch_head.buf);
>           if (!head_points_at)
>                   warning("remote branch not found, etc");
>   }
>   if (!head_points_at)
>     head_points_at = guess_remote_head(remote_head, mapped_refs, 0);

Hm, why "refs" for find_ref_by_name(), but "mapped_ref" for
guess_remote_head()?

Björn
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]