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
This commit is contained in:
14
refs.h
14
refs.h
@@ -771,6 +771,20 @@ int ref_transaction_update(struct ref_transaction *transaction,
|
||||
unsigned int flags, const char *msg,
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user