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

Re: master^ is not a local branch -- huh?!?

From
RGRon Garret <ron1@flownet.com>
Date
Feb 2, 2010, 01:12 UTC
Message-ID
<ron1-1E906F.17124201022010@news.gmane.org>
In-Reply-To
<7vk4uwmp95.fsf@alter.siamese.dyndns.org>
In article <7vk4uwmp95.fsf@alter.siamese.dyndns.org>,
 Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Ron Garret <ron1@flownet.com> writes:
> 
> > The manual specifically contradicts you, so either you are wrong or the 
> > manual is wrong.
> 
> In case you haven't noticed, Pasky is one of the old timers and he knows a
> thing or two about the git's world model.

My intent was not to diss Pasky, it was just to point out a disconnect between what he was saying and what the manual says. It's quite possible that the manual is wrong or out of date or just misleading. But it says what it says.

> And I do not see a contradiction in what the manual describes and "a
> branch is a named pointer to a commit" (although "named" can probably be
> omitted as "unnamed pointer" is not useful at the UI level).

But that's not what the manual says. The manual says, "When we need to be precise, we will use the word "branch" to mean a line of development..." Those are the first words in the section entitled "Understanding history: What is a branch?" It certainly appears to the untrained eye that that is intended to be the definition of a branch.

Maybe the manual just needs to be updated. "A named pointer to a commit" is a useful definition, and a lot clearer than "a line of development" (I don't even know what that means). I do think it's important to keep "named" to distinguish them from, for example, SHA1 hashes which are (or at least can be) unnamed pointers to commits.

In fact, the whole issue of detached/attached HEAD comes down to whether HEAD is a direct reference to a commit through its hash, or an indirect reference to a commit through a named reference that it "drags along" the next time a commit is, er, committed. :-)

BTW, my intent here is not to critique git's design, or to pump myself up as some kind of an expert or to cut anybody down or anything like that. I'm just trying to point out how what is written down can lead to confusion for someone who doesn't know what's going on, and to make some constructive suggestions on how the situation could be improved. That's all.

rg
Previous: Junio C HamanoNext: J. Bruce Fields
Message 12 of 24 in “Re: master^ is not a local branch -- huh?!?”
  1. Steve DiverFeb 1, 2010
  2. Junio C HamanoFeb 1, 2010
  3. Sergei OrganovFeb 1, 2010
  4. Ron GarretFeb 1, 2010
  5. Petr BaudisFeb 1, 2010
  6. Nicolas PitreFeb 1, 2010
  7. Junio C HamanoFeb 1, 2010
  8. Ron GarretFeb 1, 2010
  9. Petr BaudisFeb 2, 2010
  10. Ron GarretFeb 2, 2010
  11. Junio C HamanoFeb 2, 2010
  12. Ron GarretFeb 2, 2010
  13. J. Bruce FieldsFeb 2, 2010
  14. Ron GarretFeb 2, 2010
  15. J. Bruce FieldsFeb 3, 2010
  16. Nicolas PitreFeb 2, 2010
  17. Ron GarretFeb 2, 2010
  18. Nicolas PitreFeb 2, 2010
  19. tytso@mit.eduFeb 2, 2010
  20. Junio C HamanoFeb 2, 2010
  21. Junio C HamanoFeb 2, 2010
  22. Nicolas PitreFeb 1, 2010
  23. Jay SoffianFeb 1, 2010
  24. Steve DiverFeb 1, 2010

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.