@@ -1136,8 +1136,7 @@ static void prune_ref(struct files_ref_store *refs, struct ref_to_prune *r)
11361136 if (check_refname_format (r -> name , 0 ))
11371137 return ;
11381138
1139- transaction = ref_store_transaction_begin (& refs -> base ,
1140- REF_TRANSACTION_SKIP_HOOK , & err );
1139+ transaction = ref_store_transaction_begin (& refs -> base , & err );
11411140 if (!transaction )
11421141 goto cleanup ;
11431142 ref_transaction_add_update (
@@ -1208,8 +1207,7 @@ static int files_pack_refs(struct ref_store *ref_store, unsigned int flags)
12081207 struct strbuf err = STRBUF_INIT ;
12091208 struct ref_transaction * transaction ;
12101209
1211- transaction = ref_store_transaction_begin (refs -> packed_ref_store ,
1212- REF_TRANSACTION_SKIP_HOOK , & err );
1210+ transaction = ref_store_transaction_begin (refs -> packed_ref_store , & err );
12131211 if (!transaction )
12141212 return -1 ;
12151213
@@ -1266,7 +1264,6 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
12661264{
12671265 struct files_ref_store * refs =
12681266 files_downcast (ref_store , REF_STORE_WRITE , "delete_refs" );
1269- struct ref_transaction * transaction = NULL ;
12701267 struct strbuf err = STRBUF_INIT ;
12711268 int i , result = 0 ;
12721269
@@ -1276,15 +1273,10 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
12761273 if (packed_refs_lock (refs -> packed_ref_store , 0 , & err ))
12771274 goto error ;
12781275
1279- transaction = ref_store_transaction_begin (refs -> packed_ref_store ,
1280- REF_TRANSACTION_SKIP_HOOK , & err );
1281- if (!transaction )
1282- goto error ;
1283-
1284- result = packed_refs_delete_refs (refs -> packed_ref_store ,
1285- transaction , msg , refnames , flags );
1286- if (result )
1276+ if (refs_delete_refs (refs -> packed_ref_store , msg , refnames , flags )) {
1277+ packed_refs_unlock (refs -> packed_ref_store );
12871278 goto error ;
1279+ }
12881280
12891281 packed_refs_unlock (refs -> packed_ref_store );
12901282
@@ -1295,7 +1287,6 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
12951287 result |= error (_ ("could not remove reference %s" ), refname );
12961288 }
12971289
1298- ref_transaction_free (transaction );
12991290 strbuf_release (& err );
13001291 return result ;
13011292
@@ -1312,7 +1303,6 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
13121303 else
13131304 error (_ ("could not delete references: %s" ), err .buf );
13141305
1315- ref_transaction_free (transaction );
13161306 strbuf_release (& err );
13171307 return -1 ;
13181308}
@@ -2784,8 +2774,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
27842774 */
27852775 if (!packed_transaction ) {
27862776 packed_transaction = ref_store_transaction_begin (
2787- refs -> packed_ref_store ,
2788- REF_TRANSACTION_SKIP_HOOK , err );
2777+ refs -> packed_ref_store , err );
27892778 if (!packed_transaction ) {
27902779 ret = TRANSACTION_GENERIC_ERROR ;
27912780 goto cleanup ;
@@ -3056,8 +3045,7 @@ static int files_initial_transaction_commit(struct ref_store *ref_store,
30563045 & affected_refnames ))
30573046 BUG ("initial ref transaction called with existing refs" );
30583047
3059- packed_transaction = ref_store_transaction_begin (refs -> packed_ref_store ,
3060- REF_TRANSACTION_SKIP_HOOK , err );
3048+ packed_transaction = ref_store_transaction_begin (refs -> packed_ref_store , err );
30613049 if (!packed_transaction ) {
30623050 ret = TRANSACTION_GENERIC_ERROR ;
30633051 goto cleanup ;
0 commit comments