On Thu, Sep 03, 2026 at 11:27:59AM +0200, Karthik Nayak wrote:
quoted hunk ↗ jump to hunk
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 86933d8d7e..a9a3d21c24 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -2716,10 +2722,12 @@ int cmd_receive_pack(int argc,
&push_options);
delete_tempfile(&pack_lockfile);
sigchain_push(SIGPIPE, SIG_IGN);
- if (report_status_v2)
+ if (version == REPORT_STATUS_V2)
report_v2(commands, unpack_status);
- else if (report_status)
+ else if (version == REPORT_STATUS_V0)
report(commands, unpack_status);
+ else
+ BUG("unknown report status version");
Nit: I typically prefer switches when we want to handle enums, even
though they are more verbose. Please feel free to ignore though, this is
highly subjective and it's not worth a reroll.
Patrick