Re: [PATCH 2/3] builtin-remote: teach show to display remote HEAD

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

 



On Wed, 11 Feb 2009, Jay Soffian wrote:

> On Wed, Feb 11, 2009 at 7:26 PM, Jeff King <peff@xxxxxxxx> wrote:
> 
> > Yuck.
> 
> Damn, I knew I wasn't going to slip that one by. :-)
> 
> > I see that the inputs and outputs aren't exactly the same in both cases,
> 
> Which is why I didn't refactor it. The extra code needed to massage
> what builtin-remote.c has to the existing function in builtin-clone.c
> would've been more LOC than the duplicate code (I think...).

Isn't it just:

struct ref *head = locate_head(refs, refs, NULL);
return head ? xstrdup(abbrev_branch(head->name)) : NULL;

?

I'd somehow thought I'd moved locate_head() somewhere common, but it 
really ought to be done. There were periodic discussions of how you find 
out when the remote repo changes its HEAD and you might want to do 
something locally about it, and we never came up with a specific thing 
for git to do, but the facility is probably useful.

I have the vague memory, as well, that there's some way for a transport to 
report that it actually knows that HEAD is a symref to something in 
particular, and so git shouldn't guess.

	-Daniel
*This .sig left intentionally blank*
--
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]

  Powered by Linux