diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:29 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-23 09:32:29 -0800 |
| commit | 6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a (patch) | |
| tree | 1f01eb96edc6c2349de60bcdf39db81d165ba83f /refs.h | |
| parent | f74eae3e475f7d043fd0d4c9ce21f661125b630a (diff) | |
| parent | 8ddcdc1bb33ccf803461dd2365146f9341bf9312 (diff) | |
| download | git-6f8ae955bda8ad246cc1f5f7a15f1c3b1c04696a.tar.gz | |
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 |
