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

Re: Merge commit subjects git.git

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Jul 18, 2010, 18:03 UTC
Message-ID
<20100718180318.GA22033@LK-Perkele-V2.elisa-laajakaista.fi>
In-Reply-To
<AANLkTim4FxPdHsDxkRmHzJT24LnZyiv9xLUqbTUndS9T@mail.gmail.com>
On Sun, Jul 18, 2010 at 05:22:01PM +0000, Ævar Arnfjörð Bjarmason wrote:
Show 5 quoted lines
> On Sun, Jul 18, 2010 at 16:56, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> >
> > Wow, I thought the only place where we gave "master" any special
> > meaning was in that we create it as the default branch. Can't we fix
> > this to be less hard-coded?
There's yet another place as well, but its only related to obsolete pre-1.5
stuff that has very little use anymore.
 
> I.e. master is also treated more magically than others when
> cloning. But I couldn't find the code that does this, so perhaps it
> doesn't do that.

Its guess_remote_head of remote.c (checked v1.7.2-rc3+). Additionally, it appears that if master doesn't tie for exact match, then first ref in lexical order is choosen (if master ties for exact match, then it is chosen).

Additionally, it appears that if exact HEAD symref information is available (not all protocols support that), then that is choosen with no guessing.

-Ilari
Previous: Ævar Arnfjörð BjarmasonNext: Nicolas Sebrecht
Message 6 of 9 in “Merge commit subjects git.git”
  1. Jay SoffianJul 18, 2010
  2. Thomas RastJul 18, 2010
  3. Ævar Arnfjörð BjarmasonJul 18, 2010
  4. Sverre RabbelierJul 18, 2010
  5. Ævar Arnfjörð BjarmasonJul 18, 2010
  6. Ilari LiusvaaraJul 18, 2010
  7. Nicolas SebrechtJul 19, 2010
  8. Junio C HamanoJul 19, 2010
  9. Jay SoffianJul 19, 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.