diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-04-13 15:51:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-13 15:51:33 -0700 |
commit | c6da34a610e58f7e58042b5ed24a19bd2c18e928 (patch) | |
tree | fa92224f86cee761f510325d8e7e0d2f55d6fd88 /refs.c | |
parent | 1ac7422e39b0043250b026f9988d0da24cb2cb58 (diff) | |
download | git-c6da34a610e58f7e58042b5ed24a19bd2c18e928.tar.gz |
Revert "Merge branch 'ps/avoid-unnecessary-hook-invocation-with-packed-refs'"
This reverts commit 991b4d47f0accd3955d05927d5ce434e03ffbdb6, reversing
changes made to bcd020f88e1e22f38422ac3f73ab06b34ec4bef1.
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; |