Skip to content

Commit

Permalink
[PATCH] alternate object store and fsck
Browse files Browse the repository at this point in the history
The location alt_odb[j].name[0..] is filled with ??/?{38} to form a sha1
filename to try, but I was too lazy to allocate a copy, so while
fsck_object_dir() is running for the directory, the filenames ??/?{38}
are filled after NUL (usually and always the location should have '/'),
making them "not found".

This should fix it.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Junio C Hamano authored and Linus Torvalds committed Jul 10, 2005
1 parent cf21919 commit a3eb250
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fsck-cache.c
Expand Up @@ -416,9 +416,11 @@ int main(int argc, char **argv)
struct packed_git *p;
prepare_alt_odb();
for (j = 0; alt_odb[j].base; j++) {
alt_odb[j].name[-1] = 0; /* was slash */
fsck_object_dir(alt_odb[j].base);
alt_odb[j].name[-1] = '/';
char namebuf[PATH_MAX];
int namelen = alt_odb[j].name - alt_odb[j].base;
memcpy(namebuf, alt_odb[j].base, namelen);
namebuf[namelen - 1] = 0;
fsck_object_dir(namebuf);
}
prepare_packed_git();
for (p = packed_git; p; p = p->next)
Expand Down

0 comments on commit a3eb250

Please sign in to comment.