/* Forward structure decls */
struct pathspec;
struct child_process;
+struct tree;
/*
* Copy the sha1 and stat state of a cache entry from one to
extern int unmerged_index(const struct index_state *);
/**
- * Returns 1 if istate differs from HEAD, 0 otherwise. When 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.
+ * 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(const struct index_state *istate,
+ struct tree *tree,
struct strbuf *sb);
extern int verify_path(const char *path, unsigned mode);