Imported Upstream version 2.0.1
[platform/upstream/git.git] / diffcore.h
index 1c16c85..c876dac 100644 (file)
@@ -29,10 +29,8 @@ struct diff_filespec {
        char *path;
        void *data;
        void *cnt_data;
-       const char *funcname_pattern_ident;
        unsigned long size;
        int count;               /* Reference count */
-       int xfrm_flags;          /* for use by the xfrm */
        int rename_used;         /* Count of rename users */
        unsigned short mode;     /* file mode */
        unsigned sha1_valid : 1; /* if true, use sha1 and trust mode;
@@ -43,13 +41,13 @@ struct diff_filespec {
        unsigned should_free : 1; /* data should be free()'ed */
        unsigned should_munmap : 1; /* data should be munmap()'ed */
        unsigned dirty_submodule : 2;  /* For submodules: its work tree is dirty */
-       unsigned is_stdin : 1;
 #define DIRTY_SUBMODULE_UNTRACKED 1
 #define DIRTY_SUBMODULE_MODIFIED  2
+       unsigned is_stdin : 1;
        unsigned has_more_entries : 1; /* only appear in combined diff */
-       struct userdiff_driver *driver;
        /* data should be considered "binary"; -1 means "don't know yet" */
-       int is_binary;
+       signed int is_binary : 2;
+       struct userdiff_driver *driver;
 };
 
 extern struct diff_filespec *alloc_filespec(const char *);
@@ -70,6 +68,8 @@ struct diff_filepair {
        unsigned broken_pair : 1;
        unsigned renamed_pair : 1;
        unsigned is_unmerged : 1;
+       unsigned done_skip_stat_unmatch : 1;
+       unsigned skip_stat_unmatch_result : 1;
 };
 #define DIFF_PAIR_UNMERGED(p) ((p)->is_unmerged)
 
@@ -111,6 +111,20 @@ extern void diffcore_merge_broken(void);
 extern void diffcore_pickaxe(struct diff_options *);
 extern void diffcore_order(const char *orderfile);
 
+/* low-level interface to diffcore_order */
+struct obj_order {
+       void *obj;      /* setup by caller */
+
+       /* setup/used by order_objects() */
+       int orig_order;
+       int order;
+};
+
+typedef const char *(*obj_path_fn_t)(void *obj);
+
+void order_objects(const char *orderfile, obj_path_fn_t obj_path,
+                  struct obj_order *objs, int nr);
+
 #define DIFF_DEBUG 0
 #if DIFF_DEBUG
 void diff_debug_filespec(struct diff_filespec *, int, const char *);