Thread (15 messages) flat view 15 messages, 3 authors, 2016-06-15

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

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:46:09

On Wed, 11 Feb 2009, Jay Soffian wrote:
On Wed, Feb 11, 2009 at 7:26 PM, Jeff King [off-list ref] wrote:
quoted
Yuck.
Damn, I knew I wasn't going to slip that one by. :-)
quoted
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*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help