From: Christian Hesse <list@eworm•de>
To: Junio C Hamano <gitster@pobox•com>
Cc: "Christian Hesse" <mail@eworm•de>,
Bence Ferdinandy <bence@ferdinandy•com>,
git@vger•kernel.org
Subject: Re: [PATCH] fetch set_head: fix non-mirror remotes in bare repositories
Date: Fri, 24 Jan 2025 15:07:45 +0100 [thread overview]
Message-ID: <20250124150745.105593ea@leda.eworm.net> (raw)
In-Reply-To: <xmqqr04tqm86.fsf@gitster.g>
[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]
Junio C Hamano <gitster@pobox•com> on Thu, 2025/01/23 13:00:
> Bence Ferdinandy <bence@ferdinandy•com> writes:
>
> > In b1b713f722 (fetch set_head: handle mirrored bare repositories,
> > 2024-11-22) it was implicitly assumed that all remotes will be mirrors
> > in a bare repository, thus fetching a non-mirrored remote could lead to
> > HEAD pointing to a non-existent reference. Make sure we only overwrite
> > HEAD if we are in a bare repository and fetching from a mirror.
> > Otherwise, proceed as normally, and create
> > refs/remotes/<nonmirrorremote>/HEAD instead.
> >
> > Signed-off-by: Bence Ferdinandy <bence@ferdinandy•com>
> > Reported-by: Christian Hesse <list@eworm•de>
>
> These should be chronological; somebody reports an issue, the patch
> gets written, and finally it is sent out with a Sign-off to certify
> that the patch is not a stolen property.
>
> > ---
> > builtin/fetch.c | 15 ++++++++-------
> > t/t5505-remote.sh | 10 ++++++++++
> > t/t5510-fetch.sh | 13 +++++++++++++
> > 3 files changed, 31 insertions(+), 7 deletions(-)
>
> We haven't heard from Chritian; has this been tested OK?
Sorry for the late reply...
Yes, with this patch applied git behaves as expected for me.
Thanks a lot!
> What the patch does does look sensible. Thanks.
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];)
putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-01-24 14:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-11 19:26 fatal: Not a valid object name HEAD Christian Hesse
2025-01-12 14:17 ` Bence Ferdinandy
2025-01-13 16:30 ` Junio C Hamano
2025-01-12 16:51 ` [PATCH] fetch set_head: fix non-mirror remotes in bare repositories Bence Ferdinandy
2025-01-23 21:00 ` Junio C Hamano
2025-01-23 21:42 ` Bence Ferdinandy
2025-01-23 22:00 ` Eric Sunshine
2025-01-24 14:07 ` Christian Hesse [this message]
2025-01-24 17:17 ` Junio C Hamano
2025-01-24 5:56 ` Patrick Steinhardt
2025-01-24 10:30 ` Eric Sunshine
2025-01-24 16:07 ` Junio C Hamano
2025-01-26 22:01 ` Bence Ferdinandy
2025-01-26 22:01 ` Bence Ferdinandy
2025-01-26 22:02 ` [PATCH v2 1/2] fetch set_head: refactor to use remote directly Bence Ferdinandy
2025-01-26 22:02 ` [PATCH v2 2/2] fetch set_head: fix non-mirror remotes in bare repositories Bence Ferdinandy
2025-01-27 7:30 ` Patrick Steinhardt
2025-01-27 20:18 ` Junio C Hamano
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=20250124150745.105593ea@leda.eworm.net \
--to=list@eworm$(echo .)de \
--cc=bence@ferdinandy$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=mail@eworm$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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