From d6491e3a214541aeb016b0688d0920845b03932d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 24 Nov 2006 15:58:04 +0100 Subject: [PATCH] fetch-pack: Properly remove the shallow file when it becomes empty. The code was unlinking the lock file instead. Signed-off-by: Alexandre Julliard Signed-off-by: Junio C Hamano --- fetch-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch-pack.c b/fetch-pack.c index d00573d02..bb310b644 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -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); -- 2.26.2