Code

git-filter-branch: document --original option
[git.git] / diffcore.h
index 1ea80671e30500f95fc1b648ccc6d5143ac0ac52..eef17c4ca2e81c572fb110e9eb11e8ed9d51f9a0 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * Copyright (C) 2005 Junio C Hamano
  */
-#ifndef _DIFFCORE_H_
-#define _DIFFCORE_H_
+#ifndef DIFFCORE_H
+#define DIFFCORE_H
 
 /* This header file is internal between diff.c and its diff transformers
  * (e.g. diffcore-rename, diffcore-pickaxe).  Never include this header
@@ -27,6 +27,7 @@ struct diff_filespec {
        char *path;
        void *data;
        void *cnt_data;
+       const char *funcname_pattern_ident;
        unsigned long size;
        int xfrm_flags;          /* for use by the xfrm */
        unsigned short mode;     /* file mode */
@@ -37,6 +38,8 @@ struct diff_filespec {
 #define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
        unsigned should_free : 1; /* data should be free()'ed */
        unsigned should_munmap : 1; /* data should be munmap()'ed */
+       unsigned checked_attr : 1;
+       unsigned is_binary : 1; /* data should be considered "binary" */
 };
 
 extern struct diff_filespec *alloc_filespec(const char *);
@@ -45,6 +48,7 @@ extern void fill_filespec(struct diff_filespec *, const unsigned char *,
 
 extern int diff_populate_filespec(struct diff_filespec *, int);
 extern void diff_free_filespec_data(struct diff_filespec *);
+extern int diff_filespec_is_binary(struct diff_filespec *);
 
 struct diff_filepair {
        struct diff_filespec *one;
@@ -103,8 +107,8 @@ void diff_debug_queue(const char *, struct diff_queue_struct *);
 #define diff_debug_queue(a,b) do {} while(0)
 #endif
 
-extern int diffcore_count_changes(void *src, unsigned long src_size,
-                                 void *dst, unsigned long dst_size,
+extern int diffcore_count_changes(struct diff_filespec *src,
+                                 struct diff_filespec *dst,
                                  void **src_count_p,
                                  void **dst_count_p,
                                  unsigned long delta_limit,