summaryrefslogtreecommitdiff
path: root/src/filebuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/filebuf.c')
-rw-r--r--src/filebuf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/filebuf.c b/src/filebuf.c
index 418efc266..01df8e2d0 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -291,6 +291,8 @@ int git_filebuf_commit(git_filebuf *file, mode_t mode)
goto cleanup;
}
+ p_unlink(file->path_original);
+
error = p_rename(file->path_lock, file->path_original);
cleanup: