git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ian Molton <git-ian@mnementh.co.uk>
Cc: stefan.naewe@atlas-elektronik.com, git@vger.kernel.org
Subject: Re: AW: git log on bare repository fails if the default branch is not called master
Date: Fri, 03 Jun 2022 11:56:12 -0700	[thread overview]
Message-ID: <xmqqmtetfuer.fsf@gitster.g> (raw)
In-Reply-To: <9df6c37e-4c43-7697-0562-c49d4fa5b38f@mnementh.co.uk> (Ian Molton's message of "Fri, 3 Jun 2022 19:06:28 +0100")

Ian Molton <git-ian@mnementh.co.uk> writes:

> Why does a bare repo even have a HEAD file? (genuinely curious). It
> seems like it'd be best to create it when it's first pushed to? then
> it'd match whatever is used in the pushing repo...

There indeed are things that have no reason to exist in a bare
repository, but HEAD is not among them.

It should have HEAD to indicate what the owner of the repository
considers the primary branch to follow the project hosted there.
Anybody cloning from that bare repository will learn the name of
what HEAD points at and that branch gets checked out when "clone"
finishes its job.


  reply	other threads:[~2022-06-03 18:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 14:22 BUG: git log on bare repository fails if the default branch is not called master Ian Molton
2022-06-03 14:40 ` AW: " stefan.naewe
2022-06-03 18:06   ` Ian Molton
2022-06-03 18:56     ` Junio C Hamano [this message]
2022-06-04  0:50     ` Chris Torek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqmtetfuer.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git-ian@mnementh.co.uk \
    --cc=git@vger.kernel.org \
    --cc=stefan.naewe@atlas-elektronik.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).