All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, jltobler@gmail.com,
	kristofferhaugsbakk@fastmail.com,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v6 3/4] receive-pack: move message generation to separate function
Date: Thu, 3 Sep 2026 12:03:39 +0200	[thread overview]
Message-ID: <aplF-zxlGRqZs6tf@pks.im> (raw)
In-Reply-To: <20260903-758-introduce-hook-v6-3-6283b1fb9b1c@gmail.com>

On Thu, Sep 03, 2026 at 11:28:00AM +0200, Karthik Nayak wrote:
> diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
> index a9a3d21c24..9ac10465ac 100644
> --- a/builtin/receive-pack.c
> +++ b/builtin/receive-pack.c
> @@ -2535,67 +2535,72 @@ static void update_shallow_info(struct command *commands,
[snip]
> +static void report(struct command *commands, const char *unpack_status)
> +{
> +	struct strbuf buf = STRBUF_INIT;
> +
> +	generate_report(&buf, commands, unpack_status, REPORT_STATUS_V0);
> +
> +	if (use_sideband)
> +		send_sideband(1, 1, buf.buf, buf.len, use_sideband);
> +	else
> +		write_or_die(1, buf.buf, buf.len);
> +	strbuf_release(&buf);
> +}
> +
> +static void report_v2(struct command *commands, const char *unpack_status)
> +{
> +	struct strbuf buf = STRBUF_INIT;
> +
> +	generate_report(&buf, commands, unpack_status, REPORT_STATUS_V2);
>  
>  	if (use_sideband)
>  		send_sideband(1, 1, buf.buf, buf.len, use_sideband);

A bit hard to see, but aren't these two functions now exactly the same
except for the enum passed to `generate_report()`?

Patrick

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

Thread overview: 56+ 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 [this message]
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

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=aplF-zxlGRqZs6tf@pks.im \
    --to=ps@pks.im \
    --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 \
    /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.