diff options
author | Bence Ferdinandy <bence@ferdinandy.com> | 2024-11-22 13:28:48 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-11-25 03:46:36 +0100 |
commit | ed2f6f8804cc142a02c701e808d110223b0256f8 (patch) | |
tree | 2a6ab1d8da95b7794b8d59b080c8ee0753f08722 /refs.h | |
parent | remote set-head: better output for --auto (diff) | |
download | git-ed2f6f8804cc142a02c701e808d110223b0256f8.tar.xz git-ed2f6f8804cc142a02c701e808d110223b0256f8.zip |
refs: add TRANSACTION_CREATE_EXISTS error
Currently there is only one special error for transaction, for when
there is a naming conflict, all other errors are dumped under a generic
error. Add a new special error case for when the caller requests the
reference to be updated only when it does not yet exist and the
reference actually does exist.
Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -773,8 +773,10 @@ int ref_transaction_verify(struct ref_transaction *transaction, /* Naming conflict (for example, the ref names A and A/B conflict). */ #define TRANSACTION_NAME_CONFLICT -1 +/* When only creation was requested, but the ref already exists. */ +#define TRANSACTION_CREATE_EXISTS -2 /* All other errors. */ -#define TRANSACTION_GENERIC_ERROR -2 +#define TRANSACTION_GENERIC_ERROR -3 /* * Perform the preparatory stages of committing `transaction`. Acquire |