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>
This commit is contained in:
Alexandre Julliard 2006-11-24 15:58:04 +01:00 committed by Junio C Hamano
parent 176d45cb20
commit d6491e3a21

View File

@ -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);