Skip to contentSkip to conversation

fetch-pack: Properly remove the shallow file when it becomes empty.

PATCH In review Alexandre Julliard 1 participant 1 message Aug 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 fetch-pack: Properly remove the shallow file when it becomes empty.

The code was unlinking the lock file instead.

---
 fetch-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fetch-pack.c +1 -1
index d00573d..bb310b6 100644
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
 
 		fd = hold_lock_file_for_update(&lock, shallow, 1);
 		if (!write_shallow_commits(fd, 0)) {
-			unlink(lock.filename);
+			unlink(shallow);
 			rollback_lock_file(&lock);
 		} else {
 			close(fd);
Signature · 4 lines
1.4.4.1.ga335e

-- 
Alexandre Julliard