[PATCH 1/5] fetch-pack: Properly remove the shallow file when it becomes empty.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code was unlinking the lock file instead.

Signed-off-by: Alexandre Julliard <julliard@xxxxxxxxxx>
---
 fetch-pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index d00573d..bb310b6 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);
-- 
1.4.4.1.ga335e

-- 
Alexandre Julliard
julliard@xxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]