Thread (6 messages) 6 messages, 3 authors, 2016-06-15

Re: Tracking of local branches

flat view

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

Possibly related (same subject, not in this thread)

On Fri, 20 Mar 2009, Junio C Hamano wrote:
Michael J Gruber [off-list ref] writes:
quoted
I semi-successfully messed around in remote.c (format_tracking_info(),
stat_tracking_info()) to make it use branch->merge_name rather than
branch->merge. This makes "git status" work as expected ("Your branch
is... severely screwed.") for tracked local branches. (It's messed up
for remote ones but hey it was a first shot; merge[0]->dst is really
needed here I guess.)

Now I could go after sha1_name.c and do the same,

OR

make it so that all branches have their merge member set up, uhm. Any
possible side effects?
My gut feeling is that the latter if works should be preferable for
consistency if nothing else.

The "struct branch" hasn't changed ever since it was introduced by cf81834
(Report information on branches from remote.h, 2007-09-10) and Daniel
might know about some corner cases that rely on branch.merge not being set
up for local ones, but honestly, I would think it would be a bug in the
existing code if there were such cases.
As long as the semantics for tracking local branches are the same as for 
tracking remote ones, I'm pretty sure there's nothing that relies on 
branch.merge not being something local.

	-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