diff options
Diffstat (limited to 'refs/files-backend.c')
| -rw-r--r-- | refs/files-backend.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 8b282f2a60..088b52c740 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2761,6 +2761,8 @@ static void files_transaction_cleanup(struct files_ref_store *refs, if (lock) { unlock_ref(lock); + try_remove_empty_parents(refs, update->refname, + REMOVE_EMPTY_PARENTS_REF); update->backend_data = NULL; } } @@ -3209,6 +3211,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)) { @@ -3240,6 +3246,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; |
