From ee4f439fea8974c4d9de798460eb95a2ac001156 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 1 May 2005 21:07:40 -0700 Subject: [PATCH] Do not call fetch() when we have it. Currently pull() calls fetch() without checking whether we have the wanted object but all of the existing fetch() implementations perform this check and return success themselves. This patch moves the check to the caller. I will be sending a trivial git-local-pull which depends on this in the next message. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- http-pull.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'http-pull.c') diff --git a/http-pull.c b/http-pull.c index d877c4abe3..f693aba61b 100644 --- a/http-pull.c +++ b/http-pull.c @@ -53,10 +53,6 @@ int fetch(unsigned char *sha1) char *url; char *posn; - if (has_sha1_file(sha1)) { - return 0; - } - local = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666); if (local < 0) -- cgit v1.3