From: Junio C Hamano <gitster@pobox.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH] builtin/push: call set_refspecs after validating remote
Date: Mon, 08 Jul 2024 12:17:38 -0700 [thread overview]
Message-ID: <xmqqsewjelrh.fsf@gitster.g> (raw)
In-Reply-To: <20240708140350.622986-1-karthik.188@gmail.com> (Karthik Nayak's message of "Mon, 8 Jul 2024 16:03:50 +0200")
Karthik Nayak <karthik.188@gmail.com> writes:
> Since 9badf97c4 (remote: allow resetting url list),
Please do not be original in places where it shouldn't matter. Use
"git show -s --format=reference" that includes the datestamp to help
readers judge how old the problem is.
> we reset the remote
> URL if the provided URL is empty. This means any caller of
> `remotes_remote_get()` would now get a NULL remote.
"NULL remote" meaning?
If you have this:
[remote "multi"]
url = wrong-one
url = wrong-two
url =
and ask "remotes_remote_get()" to give you the remote "multi", you'd
get a remote whose URL array has no elements. Is that what you are
referring to?
> The 'builtin/push.c' code, calls 'set_refspecs' before validating the
> remote.
There is a comment about "lazily grab remote", so it is very
understandable.
> This worked earlier since we would get a remote, albeit with an
> empty URL. With the new changes, we get a NULL remote and this crashes.
You'd really really need to clarify what you mean by "a NULL remote"
if you want the proposed log message and the change to be
understood. The change made by 9badf97c (remote: allow resetting
url list, 2024-06-14), as far as I can tell, can make the strvecs
that hold URL and pushURL in a remote structure empty, but it does
not otherwise destroy the remote structure, or nullify a pointer
that points at the remote structure. So I am completely lost here.
next prev parent reply other threads:[~2024-07-08 19:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 14:03 [PATCH] builtin/push: call set_refspecs after validating remote Karthik Nayak
2024-07-08 19:17 ` Junio C Hamano [this message]
2024-07-08 23:33 ` Jeff King
2024-07-09 9:59 ` Karthik Nayak
2024-07-08 23:32 ` Jeff King
2024-07-09 9:05 ` Karthik Nayak
2024-07-09 9:59 ` Jeff King
2024-07-09 14:49 ` [PATCH v2] " Karthik Nayak
2024-07-09 18:44 ` Junio C Hamano
2024-07-09 18:56 ` Junio C Hamano
2024-07-09 23:55 ` Jeff King
2024-07-10 1:04 ` Junio C Hamano
2024-07-10 13:12 ` Karthik Nayak
2024-07-10 15:34 ` Junio C Hamano
2024-07-10 15:46 ` Jeff King
2024-07-11 9:35 ` Karthik Nayak
2024-07-11 21:32 ` Jeff King
2024-07-11 9:39 ` [PATCH v3] " Karthik Nayak
2024-07-11 15:08 ` Junio C Hamano
2024-07-11 21:33 ` Jeff King
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=xmqqsewjelrh.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=karthik.188@gmail.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.