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

Re: [PATCH] clone: support unusual remote ref configurations

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2022, 21:51 UTC
Message-ID
<xmqqwnimp3nb.fsf@gitster.g>
In-Reply-To
<20220124180909.2437002-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
> When cloning a branchless and tagless but not refless remote using
> protocol v0 or v1, Git calls transport_fetch_refs() with an empty ref
> list. This makes the clone fail with the message "remote transport
> reported error".

Despite what the title says, I do not think this would be so "unusual". To a freshly created repository, if you added a remote or two, fetched from them, but haven't created a commit of your own (or forked from these remotes) yet, you'd have no refs in heads/ and tags/ but refs in refs/remotes/.

2.35 would fail as expected with "remote transport reported error" in such a situation. With your fix, it creates an empty repository with expected fetch refspec.

Which looks good.
Previous: Junio C Hamano
Message 3 of 3 in “clone: support unusual remote ref configurations”
  1. clone: support unusual remote ref configurationsJonathan Tan, Jan 24, 2022
  2. Junio C HamanoJan 26, 2022
  3. Junio C HamanoJan 26, 2022

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.