summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2006-11-24 15:58:04 +0100
committerJunio C Hamano <junkio@cox.net>2006-11-24 15:42:49 -0800
commitd6491e3a214541aeb016b0688d0920845b03932d (patch)
treeda10e469a18b3b624c57b64d8d4316abc7046ba2 /fetch-pack.c
parent176d45cb20eb4ffc661d73383aec01943e056e10 (diff)
downloadgit-d6491e3a214541aeb016b0688d0920845b03932d.tar.gz
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>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index d00573d022..bb310b644f 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);