From: Alexandre Julliard Date: Fri, 24 Nov 2006 14:58:04 +0000 (+0100) Subject: fetch-pack: Properly remove the shallow file when it becomes empty. X-Git-Tag: v1.5.0-rc1~172^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d6491e3a214541aeb016b0688d0920845b03932d;p=git.git 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 --- 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);