Merge branch 'nd/remove-unused' into HEAD
authorJunio C Hamano <gitster@pobox.com>
Wed, 18 May 2016 21:40:11 +0000 (14:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 18 May 2016 21:40:11 +0000 (14:40 -0700)
Code cleanup.

* nd/remove-unused:
wrapper.c: delete dead function git_mkstemps()
dir.c: remove dead function fnmatch_icase()

1  2 
cache.h
diff --combined cache.h
index 2711048cad7d5c7bba04c5737aa6142caf49d023,b306b5f07112797babf434a35d115c30474e057c..fd728f079320cb05bb01bb9a5764fcb0943a1f19
+++ b/cache.h
@@@ -651,6 -651,7 +651,6 @@@ extern int prefer_symlink_refs
  extern int log_all_ref_updates;
  extern int warn_ambiguous_refs;
  extern int warn_on_object_refname_ambiguity;
 -extern int shared_repository;
  extern const char *apply_default_whitespace;
  extern const char *apply_default_ignorewhitespace;
  extern const char *git_attributes_file;
@@@ -663,9 -664,6 +663,9 @@@ extern size_t delta_base_cache_limit
  extern unsigned long big_file_threshold;
  extern unsigned long pack_size_limit_cfg;
  
 +void set_shared_repository(int value);
 +int get_shared_repository(void);
 +
  /*
   * Do replace refs need to be checked this run?  This variable is
   * initialized to true unless --no-replace-object is used or
@@@ -747,39 -745,9 +747,39 @@@ extern int grafts_replace_parents
   */
  #define GIT_REPO_VERSION 0
  #define GIT_REPO_VERSION_READ 1
 -extern int repository_format_version;
  extern int repository_format_precious_objects;
 -extern int check_repository_format(void);
 +
 +struct repository_format {
 +      int version;
 +      int precious_objects;
 +      int is_bare;
 +      char *work_tree;
 +      struct string_list unknown_extensions;
 +};
 +
 +/*
 + * Read the repository format characteristics from the config file "path" into
 + * "format" struct. Returns the numeric version. On error, -1 is returned,
 + * format->version is set to -1, and all other fields in the struct are
 + * undefined.
 + */
 +int read_repository_format(struct repository_format *format, const char *path);
 +
 +/*
 + * Verify that the repository described by repository_format is something we
 + * can read. If it is, return 0. Otherwise, return -1, and "err" will describe
 + * any errors encountered.
 + */
 +int verify_repository_format(const struct repository_format *format,
 +                           struct strbuf *err);
 +
 +/*
 + * Check the repository format version in the path found in get_git_dir(),
 + * and die if it is a version we don't understand. Generally one would
 + * set_git_dir() before calling this, and use it only for "are we in a valid
 + * repo?".
 + */
 +extern void check_repository_format(void);
  
  #define MTIME_CHANGED 0x0001
  #define CTIME_CHANGED 0x0002
@@@ -958,8 -926,6 +958,6 @@@ static inline int is_empty_blob_sha1(co
  
  int git_mkstemp(char *path, size_t n, const char *template);
  
- int git_mkstemps(char *path, size_t n, const char *template, int suffix_len);
  /* set default permissions by passing mode arguments to open(2) */
  int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
  int git_mkstemp_mode(char *pattern, int mode);
@@@ -1558,6 -1524,7 +1556,6 @@@ extern void git_config(config_fn_t fn, 
  extern int git_config_with_options(config_fn_t fn, void *,
                                   struct git_config_source *config_source,
                                   int respect_includes);
 -extern int git_config_early(config_fn_t fn, void *, const char *repo_config);
  extern int git_parse_ulong(const char *, unsigned long *);
  extern int git_parse_maybe_bool(const char *);
  extern int git_config_int(const char *, const char *);
@@@ -1581,6 -1548,7 +1579,6 @@@ extern void git_config_set_multivar_in_
  extern int git_config_rename_section(const char *, const char *);
  extern int git_config_rename_section_in_file(const char *, const char *, const char *);
  extern const char *git_etc_gitconfig(void);
 -extern int check_repository_format_version(const char *var, const char *value, void *cb);
  extern int git_env_bool(const char *, int);
  extern unsigned long git_env_ulong(const char *, unsigned long);
  extern int git_config_system(void);