From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] clone: support unusual remote ref configurations
Date: Wed, 26 Jan 2022 13:51:04 -0800 [thread overview]
Message-ID: <xmqqwnimp3nb.fsf@gitster.g> (raw)
In-Reply-To: <20220124180909.2437002-1-jonathantanmy@google.com> (Jonathan Tan's message of "Mon, 24 Jan 2022 10:09:09 -0800")
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.
prev parent reply other threads:[~2022-01-26 21:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 18:09 [PATCH] clone: support unusual remote ref configurations Jonathan Tan
2022-01-26 19:11 ` Junio C Hamano
2022-01-26 21:51 ` Junio C Hamano [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqwnimp3nb.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jonathantanmy@google.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).