]> asedeno.scripts.mit.edu Git - git.git/blobdiff - local-fetch.c
Merge branch 'fixes'
[git.git] / local-fetch.c
index a57386ca6a632c2e0a43348ed8b147692746a44f..87a93de02f759f544ebfd1d6fb584886f483fbfc 100644 (file)
@@ -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)