2 * Copyright (C) 2005 Junio C Hamano
7 #define DIFF_FILE_CANON_MODE(mode) \
8 (S_ISREG(mode) ? (S_IFREG | ce_permissions(mode)) : \
9 S_ISLNK(mode) ? S_IFLNK : S_IFDIR)
11 extern void diff_addremove(int addremove
,
13 const unsigned char *sha1
,
17 extern void diff_change(unsigned mode1
, unsigned mode2
,
18 const unsigned char *sha1
,
19 const unsigned char *sha2
,
20 const char *base
, const char *path
);
22 extern void diff_helper_input(unsigned mode1
,
24 const unsigned char *sha1
,
25 const unsigned char *sha2
,
31 extern void diff_unmerge(const char *path
);
33 extern int diff_scoreopt_parse(const char *opt
);
35 #define DIFF_SETUP_REVERSE 1
36 #define DIFF_SETUP_USE_CACHE 2
37 #define DIFF_SETUP_USE_SIZE_CACHE 4
38 extern void diff_setup(int flags
);
40 #define DIFF_DETECT_RENAME 1
41 #define DIFF_DETECT_COPY 2
43 extern void diffcore_rename(int rename_copy
, int minimum_score
);
45 #define DIFF_PICKAXE_ALL 1
46 extern void diffcore_pickaxe(const char *needle
, int opts
);
48 extern void diffcore_pathspec(const char **pathspec
);
50 extern void diffcore_order(const char *orderfile
);
52 extern void diffcore_break(int max_score
);
54 extern void diffcore_std(const char **paths
,
55 int detect_rename
, int rename_score
,
56 const char *pickaxe
, int pickaxe_opts
,
58 const char *orderfile
);
60 extern int diff_queue_is_empty(void);
62 #define DIFF_FORMAT_HUMAN 0
63 #define DIFF_FORMAT_MACHINE 1
64 #define DIFF_FORMAT_PATCH 2
65 #define DIFF_FORMAT_NO_OUTPUT 3
67 extern void diff_flush(int output_style
, int resolve_rename_copy
);