@matheusbsbs / matheus-bagliano / commits / d6491e3a21
Fork 0

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

The code was unlinking the lock file instead. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Alexandre Julliard committed Nov 24, 2006 at 15:58 UTC d6491e3a214541aeb016b0688d0920845b03932d
1 file changed +1 -1
fetch-pack.c
+1 -1
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
700
701 fd = hold_lock_file_for_update(&lock, shallow, 1);
702 if (!write_shallow_commits(fd, 0)) {
703 - unlink(lock.filename);
703 + unlink(shallow);
704 rollback_lock_file(&lock);
705 } else {
706 close(fd);