git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/4] upload-pack: only accept packfile-uris if we advertised it
Date: Thu, 29 Feb 2024 08:34:48 -0800	[thread overview]
Message-ID: <xmqqmsrji5zr.fsf@gitster.g> (raw)
In-Reply-To: <20240229054239.GA1669526@coredump.intra.peff.net> (Jeff King's message of "Thu, 29 Feb 2024 00:42:39 -0500")

Jeff King <peff@peff.net> writes:

> Sorry, this needs one tweak to pass under the sha256 CI job:
>
> diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh
> index 902e42c1c0..1ef540f73d 100755
> --- a/t/t5702-protocol-v2.sh
> +++ b/t/t5702-protocol-v2.sh
> @@ -781,6 +781,7 @@ test_expect_success 'archive with custom path does not request v2' '
>  test_expect_success 'reject client packfile-uris if not advertised' '
>  	{
>  		packetize command=fetch &&
> +		packetize object-format=$(test_oid algo) &&
>  		printf 0001 &&
>  		packetize packfile-uris https &&
>  		packetize done &&
>
> Otherwise the server complains that the other side did not respect its
> advertised object-format (I sure am glad to have included the final
> "hey, this input works, right?" test there, as that is what caught it).

Ah, good finding.  Will use it to amend.

I wonder if it is still worth testing if the command is happy with
an input that lacks object-format capability under SHA-1 mode.  This
test piece is primarily about packfile-uris, so in that sense, we
are not all that interested in that unspecified client object-format
defaults to the initial value of serve.c:client_hash_algo (which is
SHA-1), and not testing that here is perfectly fine, I guess.

Thanks.

  reply	other threads:[~2024-02-29 16:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 22:46 [PATCH 0/4] some v2 capability advertisement cleanups Jeff King
2024-02-28 22:46 ` [PATCH 1/4] upload-pack: use repository struct to get config Jeff King
2024-03-04  7:45   ` Patrick Steinhardt
2024-02-28 22:47 ` [PATCH 2/4] upload-pack: centralize setup of sideband-all config Jeff King
2024-02-28 22:48 ` [PATCH 3/4] upload-pack: use existing config mechanism for advertisement Jeff King
2024-02-28 22:50 ` [PATCH 4/4] upload-pack: only accept packfile-uris if we advertised it Jeff King
2024-02-28 23:43   ` Junio C Hamano
2024-02-29  5:42   ` Jeff King
2024-02-29 16:34     ` Junio C Hamano [this message]
2024-03-01  7:10       ` Jeff King
2024-03-04  7:45   ` Patrick Steinhardt
2024-02-28 23:51 ` [PATCH 0/4] some v2 capability advertisement cleanups Junio C Hamano
2024-02-29  0:44   ` Jeff King
2024-03-04  7:44 ` Patrick Steinhardt
2024-03-04 10:02   ` 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=xmqqmsrji5zr.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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 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 NNTP newsgroup(s).