archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <>
To: "Ævar Arnfjörð Bjarmason" <>
Cc:, "Clemens Fruhwirth" <>,
	"Jan Pokorný" <>,
	"Corentin BOMPARD" <>
Subject: Re: [PATCH v3] pull, fetch: fix segfault in --set-upstream option
Date: Mon, 30 Aug 2021 10:46:48 -0700	[thread overview]
Message-ID: <xmqqilzm4ygn.fsf@gitster.g> (raw)
In-Reply-To: <> (=?utf-8?B?IsOGdmFyIEFybmZqw7Zyw7A=?= Bjarmason"'s message of "Mon, 30 Aug 2021 16:41:18 +0200")

Ævar Arnfjörð Bjarmason  <> writes:

> There was an earlier submitted alternate way of fixing this in [1],
> due to that patch breaking threading with the original report at [2] I
> didn't notice it before authoring this version. I think the more
> detailed warning message here is better, and we should also have tests
> for this behavior.

I do not think it is necessarily an improvement to give more info,
if it is irrelevant to explain what the error is.  And the point of
the error message here is that we cannot set the upstream of
detached HEAD, no matter what the value of old source ref or new
source ref are.

The original from Clemens gives a warning message that omits the
piece of information that does not contribute to the error.

Testing the new behaviour is a good idea.  I also agree with you
that die() would be more appropriate and does not risk regression,
if the original behaviour was to segfault.


  reply	other threads:[~2021-08-30 17:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 15:46 git pull --set-upstream segfaults on branchless repo Clemens Fruhwirth
2021-07-19 10:04 ` Jan Pokorný
2021-07-19 14:30   ` [PATCH] pull, fetch: fix segfault in --set-upstream option Ævar Arnfjörð Bjarmason
2021-07-19 15:17     ` Junio C Hamano
2021-08-23 12:56     ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2021-08-24  7:30       ` Clemens Fruhwirth
2021-08-24  8:49         ` Ævar Arnfjörð Bjarmason
2021-08-30 14:41       ` [PATCH v3] " Ævar Arnfjörð Bjarmason
2021-08-30 17:46         ` Junio C Hamano [this message]
2021-08-31 13:58         ` [PATCH v4] " Ævar Arnfjörð Bjarmason
2021-08-31 16:40           ` Junio C Hamano
2021-08-31 20:20             ` Ævar Arnfjörð Bjarmason
2021-09-01 17:44               ` 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:

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

  git send-email \
    --in-reply-to=xmqqilzm4ygn.fsf@gitster.g \ \ \ \ \ \ \

* 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).