X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=local-fetch.c;h=87a93de02f759f544ebfd1d6fb584886f483fbfc;hb=a60d2d8f2dbeb7025e04dd65fc2dedd8271c9cc6;hp=a57386ca6a632c2e0a43348ed8b147692746a44f;hpb=d710b2655c72f37f3d065b2c8c93e022f596d460;p=git.git diff --git a/local-fetch.c b/local-fetch.c index a57386ca..87a93de0 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)