diff options
author | Junio C Hamano <junkio@cox.net> | 2005-07-10 15:40:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-10 16:16:34 -0700 |
commit | a3eb250f996bf5e12376ec88622c4ccaabf20ea8 (patch) | |
tree | 07ff6f4a2a0f1f31fad6543be9a41c7d9f7a030f /fsck-cache.c | |
parent | cf219196a89becccb50ad4a0a667a2814ddae60f (diff) | |
download | git-a3eb250f996bf5e12376ec88622c4ccaabf20ea8.tar.gz git-a3eb250f996bf5e12376ec88622c4ccaabf20ea8.tar.xz |
[PATCH] alternate object store and fsckv0.99
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>
Diffstat (limited to 'fsck-cache.c')
-rw-r--r-- | fsck-cache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fsck-cache.c b/fsck-cache.c index 48be6553a..8e21bf132 100644 --- a/fsck-cache.c +++ b/fsck-cache.c @@ -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) |