git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re* [PATCH v10 4/4] hook: introduce the receive-report hook

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 14, 2026, 22:36 UTC
Message-ID
<xmqqwlsn31gq.fsf_-_@gitster.g>
In-Reply-To
<CAOLa=ZS0PT4bb+k3HR4F_aOoJ5uUuMFx+Dnte4LpPEekFxs9uA@mail.gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
> I could send in this patch for coccinelle with the fixup if that's okay
> with you.

This patch until it gets fixed will take the coccinelle updates hostage, so let's queue the following on top before merging it down to 'next'.

----- >8 -----
Subject: [PATCH] receive-pack: coccinelle fix

Let's not check the nullness of cmd->error_string_owned before calling FREE_AND_NULL(cmd->error_string_owned). It is cheap and safe to call FREE_AND_NULL(variable) for a variable that has NULL in it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/receive-pack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 9ac7717096..1d5b050beb 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -2452,8 +2452,7 @@ static void update_shallow_info(struct command *commands,
 static void override_cmds_error(struct command *commands, const char *err)
 {
 	for (struct command *cmd = commands; cmd; cmd = cmd->next) {
-		if (cmd->error_string_owned)
-			FREE_AND_NULL(cmd->error_string_owned);
+		FREE_AND_NULL(cmd->error_string_owned);
 		cmd->error_string = err;
 	}
 }
-- 
2.56.0-rc0-195-g1e3108ffbb
Previous: Karthik NayakNext: Karthik Nayak
Message 97 of 98 in “hook: introduce the report hook for git-receive-pack(1)”
  1. hook: introduce the report hook for git-receive-pack(1)Karthik Nayak, Aug 18, 2026
  2. Junio C HamanoAug 18, 2026
  3. Kristoffer HaugsbakkAug 19, 2026
  4. Karthik NayakAug 19, 2026
  5. Kristoffer HaugsbakkAug 19, 2026
  6. Patrick SteinhardtAug 19, 2026
  7. Karthik NayakAug 19, 2026
  8. Patrick SteinhardtAug 19, 2026
  9. Karthik NayakAug 19, 2026
  10. Phillip WoodAug 20, 2026
  11. Junio C HamanoAug 20, 2026
  12. Karthik NayakAug 21, 2026
  13. hook: introduce the report hook for git-receive-pack(1)Karthik Nayak, Aug 21, 2026
  14. Patrick SteinhardtAug 21, 2026
  15. Karthik NayakAug 21, 2026
  16. Patrick SteinhardtAug 24, 2026
  17. Karthik NayakAug 24, 2026
  18. Junio C HamanoAug 21, 2026
  19. 0/3 hook: introduce the report hook for git-receive-pack(1)Karthik Nayak, Aug 24, 2026
  20. 1/3 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Aug 24, 2026
  21. 2/3 receive-pack: move message generation to separate functionKarthik Nayak, Aug 24, 2026
  22. 3/3 hook: introduce the report hook for git-receive-pack(1)Karthik Nayak, Aug 24, 2026
  23. Junio C HamanoAug 24, 2026
  24. Junio C HamanoAug 24, 2026
  25. Patrick SteinhardtAug 24, 2026
  26. Karthik NayakAug 26, 2026
  27. Junio C HamanoAug 26, 2026
  28. 0/3 hook: introduce the receive-report hookKarthik Nayak, Aug 26, 2026
  29. 1/3 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Aug 26, 2026
  30. Patrick SteinhardtAug 31, 2026
  31. Karthik NayakAug 31, 2026
  32. 2/3 receive-pack: move message generation to separate functionKarthik Nayak, Aug 26, 2026
  33. Patrick SteinhardtAug 31, 2026
  34. Karthik NayakAug 31, 2026
  35. 3/3 hook: introduce the receive-report hookKarthik Nayak, Aug 26, 2026
  36. Patrick SteinhardtAug 31, 2026
  37. 0/3 hook: introduce the receive-report hookKarthik Nayak, Sep 1, 2026
  38. 1/3 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Sep 1, 2026
  39. 2/3 receive-pack: move message generation to separate functionKarthik Nayak, Sep 1, 2026
  40. Junio C HamanoSep 1, 2026
  41. Karthik NayakSep 2, 2026
  42. 3/3 hook: introduce the receive-report hookKarthik Nayak, Sep 1, 2026
  43. Junio C HamanoSep 1, 2026
  44. Karthik NayakSep 2, 2026
  45. Junio C HamanoSep 2, 2026
  46. 0/4 hook: introduce the receive-report hookKarthik Nayak, Sep 3, 2026
  47. 1/4 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Sep 3, 2026
  48. 2/4 receive-pack: drop static variables to track report status versionKarthik Nayak, Sep 3, 2026
  49. Patrick SteinhardtSep 3, 2026
  50. Karthik NayakSep 3, 2026
  51. 3/4 receive-pack: move message generation to separate functionKarthik Nayak, Sep 3, 2026
  52. Patrick SteinhardtSep 3, 2026
  53. Karthik NayakSep 3, 2026
  54. 4/4 hook: introduce the receive-report hookKarthik Nayak, Sep 3, 2026
  55. Patrick SteinhardtSep 3, 2026
  56. Karthik NayakSep 3, 2026
  57. 0/4 hook: introduce the receive-report hookKarthik Nayak, Sep 4, 2026
  58. 1/4 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Sep 4, 2026
  59. 2/4 receive-pack: drop static variables to track report status versionKarthik Nayak, Sep 4, 2026
  60. Junio C HamanoSep 7, 2026
  61. Karthik NayakSep 8, 2026
  62. 3/4 receive-pack: move message generation to separate functionKarthik Nayak, Sep 4, 2026
  63. Junio C HamanoSep 7, 2026
  64. Karthik NayakSep 8, 2026
  65. 4/4 hook: introduce the receive-report hookKarthik Nayak, Sep 4, 2026
  66. Junio C HamanoSep 7, 2026
  67. Karthik NayakSep 8, 2026
  68. Patrick SteinhardtSep 7, 2026
  69. Karthik NayakSep 8, 2026
  70. 0/4 hook: introduce the receive-report hookKarthik Nayak, Sep 8, 2026
  71. 1/4 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Sep 8, 2026
  72. 2/4 receive-pack: drop static variables to track report status versionKarthik Nayak, Sep 8, 2026
  73. Junio C HamanoSep 8, 2026
  74. 3/4 receive-pack: move message generation to separate functionKarthik Nayak, Sep 8, 2026
  75. 4/4 hook: introduce the receive-report hookKarthik Nayak, Sep 8, 2026
  76. 0/4 hook: introduce the receive-report hookKarthik Nayak, Sep 9, 2026
  77. 1/4 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Sep 9, 2026
  78. 2/4 receive-pack: drop static variables to track report status versionKarthik Nayak, Sep 9, 2026
  79. 3/4 receive-pack: move message generation to separate functionKarthik Nayak, Sep 9, 2026
  80. 4/4 hook: introduce the receive-report hookKarthik Nayak, Sep 9, 2026
  81. Junio C HamanoSep 10, 2026
  82. Karthik NayakSep 10, 2026
  83. Oswald BuddenhagenSep 11, 2026
  84. Karthik NayakSep 11, 2026
  85. Patrick SteinhardtSep 9, 2026
  86. Junio C HamanoSep 9, 2026
  87. Jeff KingSep 10, 2026
  88. Karthik NayakSep 10, 2026
  89. Karthik NayakSep 10, 2026
  90. 0/4 hook: introduce the receive-report hookKarthik Nayak, Sep 10, 2026
  91. 1/4 doc: add proc-receive hook info in 'git-receive-pack.adoc'Karthik Nayak, Sep 10, 2026
  92. 2/4 receive-pack: drop static variables to track report status versionKarthik Nayak, Sep 10, 2026
  93. 3/4 receive-pack: move message generation to separate functionKarthik Nayak, Sep 10, 2026
  94. 4/4 hook: introduce the receive-report hookKarthik Nayak, Sep 10, 2026
  95. Junio C HamanoSep 11, 2026
  96. Karthik NayakSep 11, 2026
  97. Re* [PATCH v10 4/4] hook: introduce the receive-report hookJunio C Hamano, Sep 14, 2026
  98. Karthik NayakSep 15, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.