Re: [PATCH v3 1/2] refspec: safely parse refspecs outside a repository
Jeff King <peff@peff.net> writes:
Show 26 quoted lines
> On Mon, Mar 23, 2026 at 03:27:29PM -0700, Junio C Hamano wrote:
>
>> Looking good. Shall we declare victory and mark the topic for
>> 'next' by now?
>
> I'm not entirely convinced the better solution isn't just:
>
> diff --git a/remote-curl.c b/remote-curl.c
> index 92e40bb682..60774af929 100644
> --- a/remote-curl.c
> +++ b/remote-curl.c
> @@ -1552,6 +1552,11 @@ int cmd_main(int argc, const char **argv)
> goto cleanup;
> }
>
> + /* yuck, see 9e89dcb66a (builtin/ls-remote: fall back to SHA1 outside
> + * of a repo, 2024-08-02) */
> + if (nongit)
> + repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
> +
> options.verbosity = 1;
> options.progress = !!isatty(2);
> options.thin = 1;
>
> That would make the http transport consistent with non-http ones (or at
> least any that execute in-process within ls-remote).
Ah, yes, I like this much better.
Thanks.