Merge branch 'ps/refs-files-remove-empty-parent'
When a ref creation at refs/heads/foo/bar fails, the files backend now removes refs/heads/foo/ if the directory is otherwise not used. * ps/refs-files-remove-empty-parent: refs/files: remove empty parent dirs when ref creation fails
This commit is contained in:
@@ -2760,6 +2760,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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user