diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-04-14 14:17:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-14 14:17:12 -0700 |
commit | 4027e30c5395c9c1aeea85e99f51ac62f5148145 (patch) | |
tree | be0afd51aa31e5a0e20beafb673c72f56a422108 /refs.c | |
parent | Merge branch 'jc/relnotes-updates' (diff) | |
parent | RelNotes: revert the description on the reverted topics (diff) | |
download | tgif-4027e30c5395c9c1aeea85e99f51ac62f5148145.tar.xz |
Merge branch 'jc/revert-ref-transaction-hook-changes'
Revert the "deletion of a ref should not trigger transaction events
for loose and packed ref backends separately" that regresses the
behaviour when a ref is not modified since it was packed.
* jc/revert-ref-transaction-hook-changes:
RelNotes: revert the description on the reverted topics
Revert "fetch: increase test coverage of fetches"
Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -794,7 +794,7 @@ int refs_delete_ref(struct ref_store *refs, const char *msg, struct ref_transaction *transaction; struct strbuf err = STRBUF_INIT; - transaction = ref_store_transaction_begin(refs, 0, &err); + transaction = ref_store_transaction_begin(refs, &err); if (!transaction || ref_transaction_delete(transaction, refname, old_oid, flags, msg, &err) || @@ -999,7 +999,6 @@ int read_ref_at(struct ref_store *refs, const char *refname, } struct ref_transaction *ref_store_transaction_begin(struct ref_store *refs, - unsigned int flags, struct strbuf *err) { struct ref_transaction *tr; @@ -1007,13 +1006,12 @@ struct ref_transaction *ref_store_transaction_begin(struct ref_store *refs, CALLOC_ARRAY(tr, 1); tr->ref_store = refs; - tr->flags = flags; return tr; } struct ref_transaction *ref_transaction_begin(struct strbuf *err) { - return ref_store_transaction_begin(get_main_ref_store(the_repository), 0, err); + return ref_store_transaction_begin(get_main_ref_store(the_repository), err); } void ref_transaction_free(struct ref_transaction *transaction) @@ -1152,7 +1150,7 @@ int refs_update_ref(struct ref_store *refs, const char *msg, struct strbuf err = STRBUF_INIT; int ret = 0; - t = ref_store_transaction_begin(refs, 0, &err); + t = ref_store_transaction_begin(refs, &err); if (!t || ref_transaction_update(t, refname, new_oid, old_oid, flags, msg, &err) || @@ -2074,9 +2072,6 @@ static int run_transaction_hook(struct ref_transaction *transaction, const char *hook; int ret = 0, i; - if (transaction->flags & REF_TRANSACTION_SKIP_HOOK) - return 0; - hook = find_hook("reference-transaction"); if (!hook) return ret; |