X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=sha1_file.c;h=aea0f40d57a134a2a853136cd0815e5c743a115d;hb=fd7e9fb7ae206a64b87c7faecfc88716e98a7577;hp=696e53f1c0c9042e925a4d64500ae43a0ffd6539;hpb=637cdd9d1d997fca34a1fc668fed1311e30fe95f;p=git.git diff --git a/sha1_file.c b/sha1_file.c index 696e53f1..aea0f40d 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -617,6 +617,12 @@ static void prepare_packed_git_one(char *objdir, int local) /* we have .idx. Is it a file we can map? */ strcpy(path + len, de->d_name); + for (p = packed_git; p; p = p->next) { + if (!memcmp(path, p->pack_name, len + namelen - 4)) + break; + } + if (p) + continue; p = add_packed_git(path, len + namelen, local); if (!p) continue;