summaryrefslogtreecommitdiff
path: root/rpull.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-02 04:07:40 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-02 04:07:40 (GMT)
commitee4f439fea8974c4d9de798460eb95a2ac001156 (patch)
treeb1f2f0e3f29c09ff1398aaaafcc01cf4b177e569 /rpull.c
parent90535218ddcf530bfdbae450f92385eeef954ce8 (diff)
downloadgit-ee4f439fea8974c4d9de798460eb95a2ac001156.zip
git-ee4f439fea8974c4d9de798460eb95a2ac001156.tar.gz
git-ee4f439fea8974c4d9de798460eb95a2ac001156.tar.bz2
[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 <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'rpull.c')
-rw-r--r--rpull.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/rpull.c b/rpull.c
index 6624440..d4d4b9b 100644
--- a/rpull.c
+++ b/rpull.c
@@ -14,8 +14,6 @@ static int fd_out;
int fetch(unsigned char *sha1)
{
- if (has_sha1_file(sha1))
- return 0;
write(fd_out, sha1, 20);
return write_sha1_from_fd(sha1, fd_in);
}