summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2024-11-22 13:28:49 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-25 03:46:36 +0100
commit9963746c841dc786529827b7b6755d0a3e208ad4 (patch)
tree166b1ceddff829fc5f7f46e77f6ee714442cd824 /refs.h
parentrefs: add TRANSACTION_CREATE_EXISTS error (diff)
downloadgit-9963746c841dc786529827b7b6755d0a3e208ad4.tar.xz
git-9963746c841dc786529827b7b6755d0a3e208ad4.zip
refs: add create_only option to refs_update_symref_extended
Allow the caller to specify that it only wants to update the symref if it does not already exist. Silently ignore the error from the transaction API if the symref already exists. 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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index b243739e4b..be38377b1f 100644
--- a/refs.h
+++ b/refs.h
@@ -586,7 +586,7 @@ int refs_update_symref(struct ref_store *refs, const char *refname,
int refs_update_symref_extended(struct ref_store *refs, const char *refname,
const char *target, const char *logmsg,
- struct strbuf *referent);
+ struct strbuf *referent, int create_only);
enum action_on_err {
UPDATE_REFS_MSG_ON_ERR,