Merge branch 'jk/merge-subtree-heuristics'
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 05388e597b22632fb557603e1b173ce5bab69f4e..1398b2a4e4aa18958044acb49607c69ed0e6c125 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -220,6 +220,7 @@ struct cache_entry {
 /* Forward structure decls */
 struct pathspec;
 struct child_process;
+struct tree;
 
 /*
  * Copy the sha1 and stat state of a cache entry from one to
@@ -696,12 +697,15 @@ extern void move_index_extensions(struct index_state *dst, struct index_state *s
 extern int unmerged_index(const struct index_state *);
 
 /**
- * Returns 1 if the index differs from HEAD, 0 otherwise. When on an unborn
- * branch, returns 1 if there are entries in the index, 0 otherwise. If an
- * strbuf is provided, the space-separated list of files that differ will be
- * appended to it.
+ * Returns 1 if istate differs from tree, 0 otherwise.  If tree is NULL,
+ * compares istate to HEAD.  If tree is NULL and on an unborn branch,
+ * returns 1 if there are entries in istate, 0 otherwise.  If an strbuf is
+ * provided, the space-separated list of files that differ will be appended
+ * to it.
  */
-extern int index_has_changes(struct strbuf *sb);
+extern int index_has_changes(const struct index_state *istate,
+                            struct tree *tree,
+                            struct strbuf *sb);
 
 extern int verify_path(const char *path, unsigned mode);
 extern int strcmp_offset(const char *s1, const char *s2, size_t *first_change);
@@ -864,16 +868,13 @@ void reset_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
  * $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some
- * commands that do not want replace references to be active.  As an
- * optimization it is also set to false if replace references have
- * been sought but there were none.
+ * commands that do not want replace references to be active.
  */
-extern int check_replace_refs;
+extern int read_replace_refs;
 extern char *git_replace_ref_base;
 
 extern int fsync_object_files;
 extern int core_preload_index;
-extern int core_commit_graph;
 extern int core_apply_sparse_checkout;
 extern int precomposed_unicode;
 extern int protect_hfs;
@@ -1422,18 +1423,20 @@ extern void *read_object_with_reference(const struct object_id *oid,
 extern struct object *peel_to_type(const char *name, int namelen,
                                   struct object *o, enum object_type);
 
+enum date_mode_type {
+       DATE_NORMAL = 0,
+       DATE_RELATIVE,
+       DATE_SHORT,
+       DATE_ISO8601,
+       DATE_ISO8601_STRICT,
+       DATE_RFC2822,
+       DATE_STRFTIME,
+       DATE_RAW,
+       DATE_UNIX
+};
+
 struct date_mode {
-       enum date_mode_type {
-               DATE_NORMAL = 0,
-               DATE_RELATIVE,
-               DATE_SHORT,
-               DATE_ISO8601,
-               DATE_ISO8601_STRICT,
-               DATE_RFC2822,
-               DATE_STRFTIME,
-               DATE_RAW,
-               DATE_UNIX
-       } type;
+       enum date_mode_type type;
        const char *strftime_fmt;
        int local;
 };