Skip to content

Commit 2456990

Browse files
stefanbellergitster
authored andcommitted
sha1_file: make read_info_alternates static
read_info_alternates is not used from outside, so let's make it static. We have to declare the function before link_alt_odb_entry instead of moving the code around, link_alt_odb_entry calls read_info_alternates, which in turn calls link_alt_odb_entry. Signed-off-by: Stefan Beller <[email protected]> Reviewed-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a5b34d2 commit 2456990

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,6 @@ extern struct alternate_object_database {
13871387
char base[FLEX_ARRAY]; /* more */
13881388
} *alt_odb_list;
13891389
extern void prepare_alt_odb(void);
1390-
extern void read_info_alternates(const char * relative_base, int depth);
13911390
extern char *compute_alternate_path(const char *path, struct strbuf *err);
13921391
typedef int alt_odb_fn(struct alternate_object_database *, void *);
13931392
extern int foreach_alt_odb(alt_odb_fn, void*);

sha1_file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ static int alt_odb_usable(struct strbuf *path, const char *normalized_objdir)
279279
* SHA1, an extra slash for the first level indirection, and the
280280
* terminating NUL.
281281
*/
282+
static void read_info_alternates(const char * relative_base, int depth);
282283
static int link_alt_odb_entry(const char *entry, const char *relative_base,
283284
int depth, const char *normalized_objdir)
284285
{
@@ -369,7 +370,7 @@ static void link_alt_odb_entries(const char *alt, int len, int sep,
369370
strbuf_release(&objdirbuf);
370371
}
371372

372-
void read_info_alternates(const char * relative_base, int depth)
373+
static void read_info_alternates(const char * relative_base, int depth)
373374
{
374375
char *map;
375376
size_t mapsz;

0 commit comments

Comments
 (0)