diff options
| author | Karthik Nayak <karthik.188@gmail.com> | 2025-04-08 10:51:09 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-08 07:57:20 -0700 |
| commit | 76e760b99923cb9afb52ef08607f736ff3eeaad7 (patch) | |
| tree | 4af32ed614279fdf4d28129c99d5311c893b3cef /builtin/fetch.c | |
| parent | refs/reftable: extract code from the transaction preparation (diff) | |
| download | git-76e760b99923cb9afb52ef08607f736ff3eeaad7.tar.gz git-76e760b99923cb9afb52ef08607f736ff3eeaad7.zip | |
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>
Diffstat (limited to 'builtin/fetch.c')
| -rw-r--r-- | builtin/fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 1c740d5aac..52c913d28a 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -687,7 +687,7 @@ static int s_update_ref(const char *action, switch (ref_transaction_commit(our_transaction, &err)) { case 0: break; - case TRANSACTION_NAME_CONFLICT: + case REF_TRANSACTION_ERROR_NAME_CONFLICT: ret = STORE_REF_ERROR_DF_CONFLICT; goto out; default: |
