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:
parent
176d45cb20
commit
d6491e3a21
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user