@@ -1136,8 +1136,7 @@ static void prune_ref(struct files_ref_store *refs, struct ref_to_prune *r)
1136
1136
if (check_refname_format (r -> name , 0 ))
1137
1137
return ;
1138
1138
1139
- transaction = ref_store_transaction_begin (& refs -> base ,
1140
- REF_TRANSACTION_SKIP_HOOK , & err );
1139
+ transaction = ref_store_transaction_begin (& refs -> base , & err );
1141
1140
if (!transaction )
1142
1141
goto cleanup ;
1143
1142
ref_transaction_add_update (
@@ -1208,8 +1207,7 @@ static int files_pack_refs(struct ref_store *ref_store, unsigned int flags)
1208
1207
struct strbuf err = STRBUF_INIT ;
1209
1208
struct ref_transaction * transaction ;
1210
1209
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 );
1213
1211
if (!transaction )
1214
1212
return -1 ;
1215
1213
@@ -1266,7 +1264,6 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
1266
1264
{
1267
1265
struct files_ref_store * refs =
1268
1266
files_downcast (ref_store , REF_STORE_WRITE , "delete_refs" );
1269
- struct ref_transaction * transaction = NULL ;
1270
1267
struct strbuf err = STRBUF_INIT ;
1271
1268
int i , result = 0 ;
1272
1269
@@ -1276,15 +1273,10 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
1276
1273
if (packed_refs_lock (refs -> packed_ref_store , 0 , & err ))
1277
1274
goto error ;
1278
1275
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 );
1287
1278
goto error ;
1279
+ }
1288
1280
1289
1281
packed_refs_unlock (refs -> packed_ref_store );
1290
1282
@@ -1295,7 +1287,6 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
1295
1287
result |= error (_ ("could not remove reference %s" ), refname );
1296
1288
}
1297
1289
1298
- ref_transaction_free (transaction );
1299
1290
strbuf_release (& err );
1300
1291
return result ;
1301
1292
@@ -1312,7 +1303,6 @@ static int files_delete_refs(struct ref_store *ref_store, const char *msg,
1312
1303
else
1313
1304
error (_ ("could not delete references: %s" ), err .buf );
1314
1305
1315
- ref_transaction_free (transaction );
1316
1306
strbuf_release (& err );
1317
1307
return -1 ;
1318
1308
}
@@ -2784,8 +2774,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
2784
2774
*/
2785
2775
if (!packed_transaction ) {
2786
2776
packed_transaction = ref_store_transaction_begin (
2787
- refs -> packed_ref_store ,
2788
- REF_TRANSACTION_SKIP_HOOK , err );
2777
+ refs -> packed_ref_store , err );
2789
2778
if (!packed_transaction ) {
2790
2779
ret = TRANSACTION_GENERIC_ERROR ;
2791
2780
goto cleanup ;
@@ -3056,8 +3045,7 @@ static int files_initial_transaction_commit(struct ref_store *ref_store,
3056
3045
& affected_refnames ))
3057
3046
BUG ("initial ref transaction called with existing refs" );
3058
3047
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 );
3061
3049
if (!packed_transaction ) {
3062
3050
ret = TRANSACTION_GENERIC_ERROR ;
3063
3051
goto cleanup ;
0 commit comments