aboutsummaryrefslogtreecommitdiff
path: root/local-fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'local-fetch.c')
-rw-r--r--local-fetch.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/local-fetch.c b/local-fetch.c
index a57386ca6..87a93de02 100644
--- a/local-fetch.c
+++ b/local-fetch.c
@@ -166,7 +166,10 @@ static int fetch_file(const unsigned char *sha1)
int fetch(unsigned char *sha1)
{
- return fetch_file(sha1) && fetch_pack(sha1);
+ if (has_sha1_file(sha1))
+ return 0;
+ else
+ return fetch_file(sha1) && fetch_pack(sha1);
}
int fetch_ref(char *ref, unsigned char *sha1)