All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Patrick Steinhardt <ps@pks.im>,
	Karthik Nayak <karthik.188@gmail.com>,
	git@vger.kernel.org, jltobler@gmail.com,
	kristofferhaugsbakk@fastmail.com,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v9 0/4] hook: introduce the receive-report hook
Date: Thu, 10 Sep 2026 00:02:14 -0400	[thread overview]
Message-ID: <20260910040214.GA240960@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqh5jys5mx.fsf@gitster.g>

On Wed, Sep 09, 2026 at 10:20:54AM -0700, Junio C Hamano wrote:

> Patrick Steinhardt <ps@pks.im> writes:
> 
> > On Wed, Sep 09, 2026 at 04:51:35PM +0200, Karthik Nayak wrote:
> >> Changes in v9:
> >> - Fix a bug where we were causing a BUG() when no report was requested.
> >>   It is perfectly valid for clients to skip the report and we shouldn't
> >>   fail when they do so. Thanks Junio!
> >
> > It's curious that nothing has failed because of this. Are we lacking
> > tests here?
> 
> The "send-pack" client we have will ask for report if the server
> side advertises report-status or report-status-v2 capabilities, and
> there is no way to disable it nor there is no practical need to give
> a way to do so, so unless we are willing to write a custom client,
> or a configuration to disable server capability advertisement, such
> a test is a bit impractical to write.

You can do it with a t/interop test, but we don't have any that push.
This triggers the BUG() when HEAD is master plus the v8 patches:

diff --git a/t/interop/i5800-push.sh b/t/interop/i5800-push.sh
new file mode 100755
index 0000000000..b3035b555a
--- /dev/null
+++ b/t/interop/i5800-push.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+VERSION_A=.
+VERSION_B=v1.0.0
+MAKE_OPTS_B="NO_OPENSSL=TooOld"
+
+test_description='push to/from older client'
+. ./interop-lib.sh
+
+test_expect_success "create repo to be served by $VERSION_A" '
+	git.a init --bare dst.git
+'
+
+test_expect_success 'create commit in client' '
+	git.b init-db &&
+	echo content >file &&
+	git.b add file &&
+	git.b commit -m foo
+'
+
+test_expect_success "push with $VERSION_B" '
+	git.b push --exec="git.a receive-pack" \
+		dst.git HEAD:refs/heads/foo &&
+	echo foo >expect &&
+	git.a -C dst.git log -1 --format=%s foo >actual &&
+	test_cmp expect actual
+'
+
+test_done


Ironically the test succeeds despite the BUG(), because the client isn't
expecting a status report, so it happily returns while the server side
dies.

I think the interop suite is probably more trouble than its worth,
though. Nobody really runs it, and there are all kinds of hidden gotchas
in trying to build old versions of Git. So this is more of a fun answer
than a serious suggestion to add to the series.

-Peff

  reply	other threads:[~2026-09-10  4:02 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  7:55 [PATCH] hook: introduce the report hook for git-receive-pack(1) Karthik Nayak
2026-08-18 20:54 ` Junio C Hamano
2026-08-19  7:03 ` Kristoffer Haugsbakk
2026-08-19 12:11   ` Karthik Nayak
2026-08-19 14:47     ` Kristoffer Haugsbakk
2026-08-19  7:39 ` Patrick Steinhardt
2026-08-19 13:13   ` Karthik Nayak
2026-08-19 13:20     ` Patrick Steinhardt
2026-08-19 13:24       ` Karthik Nayak
2026-08-20  9:50 ` Phillip Wood
2026-08-20 15:43   ` Junio C Hamano
2026-08-21 12:51   ` Karthik Nayak
2026-08-21 13:34 ` [PATCH v2] " Karthik Nayak
2026-08-21 13:49   ` Patrick Steinhardt
2026-08-21 16:08     ` Karthik Nayak
2026-08-24  5:32       ` Patrick Steinhardt
2026-08-24  8:14         ` Karthik Nayak
2026-08-21 16:55     ` Junio C Hamano
2026-08-24 10:20 ` [PATCH v3 0/3] " Karthik Nayak
2026-08-24 10:20   ` [PATCH v3 1/3] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-08-24 10:21   ` [PATCH v3 2/3] receive-pack: move message generation to separate function Karthik Nayak
2026-08-24 10:21   ` [PATCH v3 3/3] hook: introduce the report hook for git-receive-pack(1) Karthik Nayak
2026-08-24 15:35   ` [PATCH v3 0/3] " Junio C Hamano
2026-08-24 15:57     ` Junio C Hamano
2026-08-24 17:00       ` Patrick Steinhardt
2026-08-26  8:35     ` Karthik Nayak
2026-08-26 14:39       ` Junio C Hamano
2026-08-26 10:19 ` [PATCH v4 0/3] hook: introduce the receive-report hook Karthik Nayak
2026-08-26 10:19   ` [PATCH v4 1/3] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-08-31  6:44     ` Patrick Steinhardt
2026-08-31 18:22       ` Karthik Nayak
2026-08-26 10:19   ` [PATCH v4 2/3] receive-pack: move message generation to separate function Karthik Nayak
2026-08-31  6:44     ` Patrick Steinhardt
2026-08-31 19:05       ` Karthik Nayak
2026-08-26 10:19   ` [PATCH v4 3/3] hook: introduce the receive-report hook Karthik Nayak
2026-08-31  6:45     ` Patrick Steinhardt
2026-09-01 15:19 ` [PATCH v5 0/3] " Karthik Nayak
2026-09-01 15:19   ` [PATCH v5 1/3] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-09-01 15:19   ` [PATCH v5 2/3] receive-pack: move message generation to separate function Karthik Nayak
2026-09-01 16:23     ` Junio C Hamano
2026-09-02 11:23       ` Karthik Nayak
2026-09-01 15:19   ` [PATCH v5 3/3] hook: introduce the receive-report hook Karthik Nayak
2026-09-01 17:03     ` Junio C Hamano
2026-09-02 14:42       ` Karthik Nayak
2026-09-02 19:14         ` Junio C Hamano
2026-09-03  9:27 ` [PATCH v6 0/4] " Karthik Nayak
2026-09-03  9:27   ` [PATCH v6 1/4] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-09-03  9:27   ` [PATCH v6 2/4] receive-pack: drop static variables to track report status version Karthik Nayak
2026-09-03 10:03     ` Patrick Steinhardt
2026-09-03 16:31       ` Karthik Nayak
2026-09-03  9:28   ` [PATCH v6 3/4] receive-pack: move message generation to separate function Karthik Nayak
2026-09-03 10:03     ` Patrick Steinhardt
2026-09-03 16:32       ` Karthik Nayak
2026-09-03  9:28   ` [PATCH v6 4/4] hook: introduce the receive-report hook Karthik Nayak
2026-09-03 10:03     ` Patrick Steinhardt
2026-09-03 16:32       ` Karthik Nayak
2026-09-04 21:28 ` [PATCH v7 0/4] " Karthik Nayak
2026-09-04 21:28   ` [PATCH v7 1/4] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-09-04 21:28   ` [PATCH v7 2/4] receive-pack: drop static variables to track report status version Karthik Nayak
2026-09-07 20:58     ` Junio C Hamano
2026-09-08  9:22       ` Karthik Nayak
2026-09-04 21:28   ` [PATCH v7 3/4] receive-pack: move message generation to separate function Karthik Nayak
2026-09-07 20:58     ` Junio C Hamano
2026-09-08  9:22       ` Karthik Nayak
2026-09-04 21:28   ` [PATCH v7 4/4] hook: introduce the receive-report hook Karthik Nayak
2026-09-07 20:58     ` Junio C Hamano
2026-09-08  9:57       ` Karthik Nayak
2026-09-07  6:06   ` [PATCH v7 0/4] " Patrick Steinhardt
2026-09-08 11:48     ` Karthik Nayak
2026-09-08 10:27 ` [PATCH v8 " Karthik Nayak
2026-09-08 10:27   ` [PATCH v8 1/4] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-09-08 10:27   ` [PATCH v8 2/4] receive-pack: drop static variables to track report status version Karthik Nayak
2026-09-08 19:50     ` Junio C Hamano
2026-09-08 10:27   ` [PATCH v8 3/4] receive-pack: move message generation to separate function Karthik Nayak
2026-09-08 10:27   ` [PATCH v8 4/4] hook: introduce the receive-report hook Karthik Nayak
2026-09-09 14:51 ` [PATCH v9 0/4] " Karthik Nayak
2026-09-09 14:51   ` [PATCH v9 1/4] doc: add proc-receive hook info in 'git-receive-pack.adoc' Karthik Nayak
2026-09-09 14:51   ` [PATCH v9 2/4] receive-pack: drop static variables to track report status version Karthik Nayak
2026-09-09 14:51   ` [PATCH v9 3/4] receive-pack: move message generation to separate function Karthik Nayak
2026-09-09 14:51   ` [PATCH v9 4/4] hook: introduce the receive-report hook Karthik Nayak
2026-09-10  3:15     ` Junio C Hamano
2026-09-10 16:32       ` Karthik Nayak
2026-09-09 15:00   ` [PATCH v9 0/4] " Patrick Steinhardt
2026-09-09 17:20     ` Junio C Hamano
2026-09-10  4:02       ` Jeff King [this message]
2026-09-10 16:40         ` Karthik Nayak
2026-09-10 13:43       ` Karthik Nayak

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=20260910040214.GA240960@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=kristofferhaugsbakk@fastmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.