git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tracking of local branches

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 20, 2009, 18:10 UTC
Message-ID
<alpine.LNX.1.00.0903201358440.19665@iabervon.org>
In-Reply-To
<7viqm4i1md.fsf@gitster.siamese.dyndns.org>
On Fri, 20 Mar 2009, Junio C Hamano wrote:
Show 24 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> 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.

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*
Previous: Junio C HamanoNext: Michael J Gruber
Message 4 of 15 in “Tracking of local branches”
  1. Michael J GruberMar 20, 2009
  2. Michael J GruberMar 20, 2009
  3. Junio C HamanoMar 20, 2009
  4. Daniel BarkalowMar 20, 2009
  5. 0/2 Make local branches behave like remote branches when --trackedMichael J Gruber, Mar 26, 2009
  6. 1/2 Test for local branches being followed with --trackMichael J Gruber, Mar 26, 2009
  7. 2/2 Make local branches behave like remote branches when --trackedMichael J Gruber, Mar 26, 2009
  8. Junio C HamanoMar 27, 2009
  9. Michael J GruberMar 27, 2009
  10. Junio C HamanoMar 27, 2009
  11. Michael J GruberMar 27, 2009
  12. 0/2 Make local branches behave like remote branches when --trackedMichael J Gruber, Apr 1, 2009
  13. 1/2 Test for local branches being followed with --trackMichael J Gruber, Apr 1, 2009
  14. 2/2 Make local branches behave like remote branches when --trackedMichael J Gruber, Apr 1, 2009
  15. Michael J GruberMar 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.