Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-02-19 00:53:27 +0300
committerJunio C Hamano <gitster@pobox.com>2022-02-19 00:53:27 +0300
commit991b4d47f0accd3955d05927d5ce434e03ffbdb6 (patch)
treeb60f5608c4a0f3a04014e57a9fbd024dadf35ef3 /refs/packed-backend.h
parentbcd020f88e1e22f38422ac3f73ab06b34ec4bef1 (diff)
parent2ed1b64ebdeefc7f9473ae159fb45ff0c6cf121a (diff)
Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'
Because a deletion of ref would need to remove it from both the loose ref store and the packed ref store, a delete-ref operation that logically removes one ref may end up invoking ref-transaction hook twice, which has been corrected. * ps/avoid-unnecessary-hook-invocation-with-packed-refs: refs: skip hooks when deleting uncovered packed refs refs: do not execute reference-transaction hook on packing refs refs: demonstrate excessive execution of the reference-transaction hook refs: allow skipping the reference-transaction hook refs: allow passing flags when beginning transactions refs: extract packed_refs_delete_refs() to allow control of transaction
Diffstat (limited to 'refs/packed-backend.h')
-rw-r--r--refs/packed-backend.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/refs/packed-backend.h b/refs/packed-backend.h
index 9dd8a344c3..52e0490753 100644
--- a/refs/packed-backend.h
+++ b/refs/packed-backend.h
@@ -3,6 +3,7 @@
struct repository;
struct ref_transaction;
+struct string_list;
/*
* Support for storing references in a `packed-refs` file.
@@ -27,6 +28,12 @@ int packed_refs_lock(struct ref_store *ref_store, int flags, struct strbuf *err)
void packed_refs_unlock(struct ref_store *ref_store);
int packed_refs_is_locked(struct ref_store *ref_store);
+int packed_refs_delete_refs(struct ref_store *ref_store,
+ struct ref_transaction *transaction,
+ const char *msg,
+ struct string_list *refnames,
+ unsigned int flags);
+
/*
* Return true if `transaction` really needs to be carried out against
* the specified packed_ref_store, or false if it can be skipped