Merge branch 'sb/sha1-file-cleanup' into next
authorJunio C Hamano <gitster@pobox.com>
Sun, 20 Aug 2017 06:07:18 +0000 (23:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 20 Aug 2017 06:07:18 +0000 (23:07 -0700)
Code clean-up.

* sb/sha1-file-cleanup:
sha1_file: make read_info_alternates static

1  2 
cache.h
sha1_file.c
diff --cc cache.h
index 379f88d454074671dd185a91bf19769c7269e5f7,11a2bcd38b3e33faed9ea7c655c878997423c89a..6ef99e7486c3bc1e3f5bd7e7510c9d201a9a30d6
+++ b/cache.h
@@@ -1526,25 -1383,10 +1526,24 @@@ extern void remove_scheduled_dirs(void)
  
  extern struct alternate_object_database {
        struct alternate_object_database *next;
 -      char *name;
 -      char base[FLEX_ARRAY]; /* more */
 +
 +      /* see alt_scratch_buf() */
 +      struct strbuf scratch;
 +      size_t base_len;
 +
 +      /*
 +       * Used to store the results of readdir(3) calls when searching
 +       * for unique abbreviated hashes.  This cache is never
 +       * invalidated, thus it's racy and not necessarily accurate.
 +       * That's fine for its purpose; don't use it for tasks requiring
 +       * greater accuracy!
 +       */
 +      char loose_objects_subdir_seen[256];
 +      struct oid_array loose_objects_cache;
 +
 +      char path[FLEX_ARRAY];
  } *alt_odb_list;
  extern void prepare_alt_odb(void);
- extern void read_info_alternates(const char * relative_base, int depth);
  extern char *compute_alternate_path(const char *path, struct strbuf *err);
  typedef int alt_odb_fn(struct alternate_object_database *, void *);
  extern int foreach_alt_odb(alt_odb_fn, void*);
diff --cc sha1_file.c
Simple merge