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

Re: [PATCH] builtin/push: call set_refspecs after validating remote

From
Jeff King <peff@peff.net>
Date
Jul 8, 2024, 23:33 UTC
Message-ID
<20240708233350.GA948906@coredump.intra.peff.net>
In-Reply-To
<xmqqsewjelrh.fsf@gitster.g>
On Mon, Jul 08, 2024 at 12:17:38PM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> > 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.

I was somewhat confused how it could happen, too. ;) I left more comments elsewhere in the thread, but the gist of it is that an empty remote name confuses the "when there are no urls, fall back to the remote name as a url" code.

-Peff
Previous: Junio C HamanoNext: Karthik Nayak
Message 3 of 20 in “builtin/push: call set_refspecs after validating remote”
  1. builtin/push: call set_refspecs after validating remoteKarthik Nayak, Jul 8, 2024
  2. Junio C HamanoJul 8, 2024
  3. Jeff KingJul 8, 2024
  4. Karthik NayakJul 9, 2024
  5. Jeff KingJul 8, 2024
  6. Karthik NayakJul 9, 2024
  7. Jeff KingJul 9, 2024
  8. builtin/push: call set_refspecs after validating remoteKarthik Nayak, Jul 9, 2024
  9. Junio C HamanoJul 9, 2024
  10. Junio C HamanoJul 9, 2024
  11. Jeff KingJul 9, 2024
  12. Junio C HamanoJul 10, 2024
  13. Karthik NayakJul 10, 2024
  14. Junio C HamanoJul 10, 2024
  15. Jeff KingJul 10, 2024
  16. Karthik NayakJul 11, 2024
  17. Jeff KingJul 11, 2024
  18. builtin/push: call set_refspecs after validating remoteKarthik Nayak, Jul 11, 2024
  19. Junio C HamanoJul 11, 2024
  20. Jeff KingJul 11, 2024

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.