]> git.ipfire.org Git - thirdparty/git.git/commit
refs: introduce enum-based transaction error types
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 8 Apr 2025 08:51:09 +0000 (10:51 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 8 Apr 2025 14:57:20 +0000 (07:57 -0700)
commit76e760b99923cb9afb52ef08607f736ff3eeaad7
tree4af32ed614279fdf4d28129c99d5311c893b3cef
parentca89c18d5cac11ca965b0f5088262c7b6210c572
refs: introduce enum-based transaction error types

Replace preprocessor-defined transaction errors with a strongly-typed
enum `ref_transaction_error`. This change:

  - Improves type safety and function signature clarity.
  - Makes error handling more explicit and discoverable.
  - Maintains existing error cases, while adding new error cases for
    common scenarios.

This refactoring paves the way for more comprehensive error handling
which we will utilize in the upcoming commits to add batch reference
update support.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
refs.c
refs.h
refs/files-backend.c
refs/packed-backend.c
refs/refs-internal.h
refs/reftable-backend.c