summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-06-21 00:45:11 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-21 00:45:12 +0200
commit5f14d2098478cc96251b52d812c5a3ebc3e03a42 (patch)
tree6d2e5ad5e0c0649cb863490ca5c73e4c1e076043 /refs.h
parentMerge branch 'gt/unit-test-oidtree' (diff)
parentupdate-ref: add support for 'symref-update' command (diff)
downloadgit-5f14d2098478cc96251b52d812c5a3ebc3e03a42.tar.xz
git-5f14d2098478cc96251b52d812c5a3ebc3e03a42.zip
Merge branch 'kn/update-ref-symref'
"git update-ref --stdin" learned to handle transactional updates of symbolic-refs. * kn/update-ref-symref: update-ref: add support for 'symref-update' command reftable: pick either 'oid' or 'target' for new updates update-ref: add support for 'symref-create' command update-ref: add support for 'symref-delete' command update-ref: add support for 'symref-verify' command refs: specify error for regular refs with `old_target` refs: create and use `ref_update_expects_existing_old_ref()`
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 756039a051..df8cbf6124 100644
--- a/refs.h
+++ b/refs.h
@@ -717,6 +717,7 @@ int ref_transaction_update(struct ref_transaction *transaction,
int ref_transaction_create(struct ref_transaction *transaction,
const char *refname,
const struct object_id *new_oid,
+ const char *new_target,
unsigned int flags, const char *msg,
struct strbuf *err);
@@ -731,7 +732,9 @@ int ref_transaction_create(struct ref_transaction *transaction,
int ref_transaction_delete(struct ref_transaction *transaction,
const char *refname,
const struct object_id *old_oid,
- unsigned int flags, const char *msg,
+ const char *old_target,
+ unsigned int flags,
+ const char *msg,
struct strbuf *err);
/*
@@ -745,6 +748,7 @@ int ref_transaction_delete(struct ref_transaction *transaction,
int ref_transaction_verify(struct ref_transaction *transaction,
const char *refname,
const struct object_id *old_oid,
+ const char *old_target,
unsigned int flags,
struct strbuf *err);