]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'sb/sha1-file-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 Aug 2017 21:13:10 +0000 (14:13 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Aug 2017 21:13:10 +0000 (14:13 -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 f99404f89ad1fa158b67cc671abad5968fdc1e98,11a2bcd38b3e33faed9ea7c655c878997423c89a..ab3b52ff926083cad9edab1c4cd90cbfdcaeae9c
+++ 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