summaryrefslogtreecommitdiff
path: root/refs/files-backend.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-08 15:49:19 -0700
committerJunio C Hamano <gitster@pobox.com>2025-07-08 15:49:19 -0700
commitcdb787224707ddd2601fde0d89701d875310a457 (patch)
treead2812a03f2947686d119e0f71e261999471b9fc /refs/files-backend.c
parent0ba1a581df94ef7508973f0ea0a6dd072b0fd974 (diff)
parent5c697f0b7ddbc85965bcba00c29d4b823bd221b7 (diff)
Merge branch 'kn/fetch-push-bulk-ref-update'
"git push" and "git fetch" are taught to update refs in batches to gain performance. * kn/fetch-push-bulk-ref-update: receive-pack: handle reference deletions separately refs/files: skip updates with errors in batched updates receive-pack: use batched reference updates send-pack: fix memory leak around duplicate refs fetch: use batched reference updates refs: add function to translate errors to strings
Diffstat (limited to 'refs/files-backend.c')
-rw-r--r--refs/files-backend.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index bf6f89b1d1..92c3d2c318 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3208,6 +3208,10 @@ static int files_transaction_finish(struct ref_store *ref_store,
*/
for (i = 0; i < transaction->nr; i++) {
struct ref_update *update = transaction->updates[i];
+
+ if (update->rejection_err)
+ continue;
+
if (update->flags & REF_DELETING &&
!(update->flags & REF_LOG_ONLY) &&
!(update->flags & REF_IS_PRUNING)) {
@@ -3239,6 +3243,9 @@ static int files_transaction_finish(struct ref_store *ref_store,
struct ref_update *update = transaction->updates[i];
struct ref_lock *lock = update->backend_data;
+ if (update->rejection_err)
+ continue;
+
if (update->flags & REF_DELETING &&
!(update->flags & REF_LOG_ONLY)) {
update->flags |= REF_DELETED_RMDIR;