summaryrefslogtreecommitdiff
path: root/fsck-cache.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-08-14 17:25:57 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2005-08-15 03:00:20 -0700
commitd5a63b99835017d2638e55a7e34a35a3c1e80f1f (patch)
tree9ba91a81866aa205908ff9d8f1292295d10dd0fc /fsck-cache.c
parentDocumentation updates. (diff)
downloadtgif-d5a63b99835017d2638e55a7e34a35a3c1e80f1f.tar.xz
Alternate object pool mechanism updates.
It was a mistake to use GIT_ALTERNATE_OBJECT_DIRECTORIES environment variable to specify what alternate object pools to look for missing objects when working with an object database. It is not a property of the process running the git commands, but a property of the object database that is partial and needs other object pools to complete the set of objects it lacks. This patch allows you to have $GIT_OBJECT_DIRECTORY/info/alternates whose contents is in exactly the same format as the environment variable, to let an object database name alternate object pools it depends on. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'fsck-cache.c')
-rw-r--r--fsck-cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fsck-cache.c b/fsck-cache.c
index e40c64332f..8091780193 100644
--- a/fsck-cache.c
+++ b/fsck-cache.c
@@ -456,13 +456,13 @@ int main(int argc, char **argv)
fsck_head_link();
fsck_object_dir(get_object_directory());
if (check_full) {
- int j;
+ struct alternate_object_database *alt;
struct packed_git *p;
prepare_alt_odb();
- for (j = 0; alt_odb[j].base; j++) {
+ for (alt = alt_odb_list; alt; alt = alt->next) {
char namebuf[PATH_MAX];
- int namelen = alt_odb[j].name - alt_odb[j].base;
- memcpy(namebuf, alt_odb[j].base, namelen);
+ int namelen = alt->name - alt->base;
+ memcpy(namebuf, alt->base, namelen);
namebuf[namelen - 1] = 0;
fsck_object_dir(namebuf);
}