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

Re: [PATCH 0/6] refs: provide detailed error messages when using batched update

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 14, 2026, 16:45 UTC
Message-ID
<xmqq1pjsgn2s.fsf@gitster.g>
In-Reply-To
<20260114-633-regression-lost-diagnostic-message-when-pushing-non-commit-objects-to-refs-heads-v1-0-f5f8b173c501@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 23 quoted lines
> The refs namespace uses an error buffer to capture details about failed
> reference updates. However when we added batched update support to
> reference transactions, these messages were never propagated, instead
> only an error code pertaining to the type of failure was propagated.
>
> Currently, there are three regions which utilize batched updates:
>
>   - git update-ref --batch-updates
>   - git fetch
>   - git receive-pack
>
> While 'git update-ref --batch-updates' was a newly introduced flag, both
> 'git fetch' and 'git receive-pack' were pre-existing. Before using
> batched updates, they provided more detailed error messages to the user,
> but this changed with the introduction of batched updates. This is a
> regression in their workings.
>
> This patch series fixes this, by passing the detailed error message and
> utilizing it whenever available. The regression was reported by Elijah
> Newren [1] and based on the patch submitted by Jeff King [2].
>
> [1]: https://lore.kernel.org/all/CABPp-BGL2tJR4dPidQuFcp-X0_VkVTknCY-0Zgo=jHVGv_P=wA@mail.gmail.com/
> [2]: https://lore.kernel.org/all/20251224081214.GA1879908@coredump.intra.peff.net/
Thanks, all.  It is very nice to see such a collaboration going ;-)
Will queue.
Show 30 quoted lines
> ---
>  builtin/fetch.c         |  9 +++++---
>  builtin/receive-pack.c  |  9 ++++++--
>  builtin/update-ref.c    | 13 +++++++-----
>  refs.c                  | 56 ++++++++++++++++++++++++++++++-------------------
>  refs.h                  |  1 +
>  refs/files-backend.c    |  3 ++-
>  refs/packed-backend.c   |  9 +++++---
>  refs/refs-internal.h    |  4 +++-
>  refs/reftable-backend.c |  3 ++-
>  t/t1400-update-ref.sh   | 26 +++++++++++------------
>  t/t5510-fetch.sh        |  8 +++----
>  t/t5516-fetch-push.sh   | 15 +++++++++++++
>  12 files changed, 102 insertions(+), 54 deletions(-)
>
> Karthik Nayak (6):
>       refs: remove unused header
>       refs: attach rejection details to updates
>       refs: add rejection detail to the callback function
>       update-ref: utilize rejected error details if available
>       fetch: utilize rejected ref error details
>       receive-pack: utilize rejected ref error details
>
>
>
> base-commit: 8745eae506f700657882b9e32b2aa00f234a6fb6
> change-id: 20260113-633-regression-lost-diagnostic-message-when-pushing-non-commit-objects-to-refs-heads-17786b20894a
>
> Thanks
> - Karthik
Previous: Karthik NayakNext: Karthik Nayak
Message 25 of 32 in “refs: provide detailed error messages when using batched update”
  1. 0/6 refs: provide detailed error messages when using batched updateKarthik Nayak, Jan 14, 2026
  2. 1/6 refs: remove unused headerKarthik Nayak, Jan 14, 2026
  3. Junio C HamanoJan 14, 2026
  4. Karthik NayakJan 15, 2026
  5. 2/6 refs: attach rejection details to updatesKarthik Nayak, Jan 14, 2026
  6. Jeff KingJan 14, 2026
  7. Karthik NayakJan 15, 2026
  8. Jeff KingJan 15, 2026
  9. Karthik NayakJan 16, 2026
  10. 3/6 refs: add rejection detail to the callback functionKarthik Nayak, Jan 14, 2026
  11. Jeff KingJan 14, 2026
  12. Karthik NayakJan 15, 2026
  13. 4/6 update-ref: utilize rejected error details if availableKarthik Nayak, Jan 14, 2026
  14. Junio C HamanoJan 14, 2026
  15. Jeff KingJan 14, 2026
  16. Karthik NayakJan 15, 2026
  17. 5/6 fetch: utilize rejected ref error detailsKarthik Nayak, Jan 14, 2026
  18. Junio C HamanoJan 14, 2026
  19. Karthik NayakJan 15, 2026
  20. Jeff KingJan 14, 2026
  21. Karthik NayakJan 15, 2026
  22. 6/6 receive-pack: utilize rejected ref error detailsKarthik Nayak, Jan 14, 2026
  23. Jeff KingJan 14, 2026
  24. Karthik NayakJan 15, 2026
  25. Junio C HamanoJan 14, 2026
  26. 0/6 refs: provide detailed error messages when using batched updateKarthik Nayak, Jan 25, 2026
  27. 1/6 refs: skip to next ref when current ref is rejectedKarthik Nayak, Jan 25, 2026
  28. 2/6 refs: add rejection detail to the callback functionKarthik Nayak, Jan 25, 2026
  29. 3/6 update-ref: utilize rejected error details if availableKarthik Nayak, Jan 25, 2026
  30. 4/6 fetch: utilize rejected ref error detailsKarthik Nayak, Jan 25, 2026
  31. 5/6 receive-pack: utilize rejected ref error detailsKarthik Nayak, Jan 25, 2026
  32. 6/6 fetch: delay user information post committing of transactionKarthik Nayak, Jan 25, 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.