From: Junio C Hamano Date: Fri, 20 Mar 2009 16:46:02 GMT Subject: Re: Tracking of local branches Message-ID: <7viqm4i1md.fsf@gitster.siamese.dyndns.org> In-Reply-To: <49C3A6AE.7020104@drmicha.warpmail.net> Michael J Gruber writes: > 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.