* SHA1, an extra slash for the first level indirection, and the
* terminating NUL.
*/
-static void read_info_alternates(const char * relative_base, int depth);
+#define read_info_alternates(r, rb, d) read_info_alternates_##r(rb, d)
+static void read_info_alternates_the_repository(const char *relative_base,
+ int depth);
#define link_alt_odb_entry(r, e, rb, d, n) link_alt_odb_entry_##r(e, rb, d, n)
static int link_alt_odb_entry_the_repository(const char *entry,
const char *relative_base, int depth, const char *normalized_objdir)
ent->next = NULL;
/* recursively add alternates */
- read_info_alternates(pathbuf.buf, depth + 1);
+ read_info_alternates(the_repository, pathbuf.buf, depth + 1);
strbuf_release(&pathbuf);
return 0;
strbuf_release(&objdirbuf);
}
-static void read_info_alternates(const char * relative_base, int depth)
+static void read_info_alternates_the_repository(const char *relative_base,
+ int depth)
{
char *path;
struct strbuf buf = STRBUF_INIT;
link_alt_odb_entries(the_repository->objects->alternate_db,
PATH_SEP, NULL, 0);
- read_info_alternates(get_object_directory(), 0);
+ read_info_alternates(the_repository, get_object_directory(), 0);
}
/* Returns 1 if we have successfully freshened the file, 0 otherwise. */