Thread (1 message) 1 message, 1 author, 2026-01-14

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

From: Junio C Hamano <hidden>
Date: 2026-01-14 16:45:33

Karthik Nayak [off-list ref] writes:
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/ (local)
[2]: https://lore.kernel.org/all/20251224081214.GA1879908@coredump.intra.peff.net/ (local)
Thanks, all.  It is very nice to see such a collaboration going ;-)

Will queue.

---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help