diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-12-23 18:32:29 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-23 18:32:29 +0100 |
commit | 6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a (patch) | |
tree | 1f01eb96edc6c2349de60bcdf39db81d165ba83f /refs.h | |
parent | Merge branch 'ma/asciidoctor-build-fixes' (diff) | |
parent | refs: mark invalid refname message for translation (diff) | |
download | git-6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a.tar.xz git-6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a.zip |
Merge branch 'kn/reflog-migration'
"git refs migrate" learned to also migrate the reflog data across
backends.
* kn/reflog-migration:
refs: mark invalid refname message for translation
refs: add support for migrating reflogs
refs: allow multiple reflog entries for the same refname
refs: introduce the `ref_transaction_update_reflog` function
refs: add `committer_info` to `ref_transaction_add_update()`
refs: extract out refname verification in transactions
refs/files: add count field to ref_lock
refs: add `index` field to `struct ref_udpate`
refs: include committer info in `ref_update` struct
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -772,6 +772,20 @@ int ref_transaction_update(struct ref_transaction *transaction, struct strbuf *err); /* + * Similar to`ref_transaction_update`, but this function is only for adding + * a reflog update. Supports providing custom committer information. The index + * field can be utiltized to order updates as desired. When not used, the + * updates default to being ordered by refname. + */ +int ref_transaction_update_reflog(struct ref_transaction *transaction, + const char *refname, + const struct object_id *new_oid, + const struct object_id *old_oid, + const char *committer_info, unsigned int flags, + const char *msg, unsigned int index, + struct strbuf *err); + +/* * Add a reference creation to transaction. new_oid is the value that * the reference should have after the update; it must not be * null_oid. It is verified that the reference does not exist |