git-cvsimport-script: typo head -> heads
[git/jnareb-git/bp-gitweb.git] / diff.h
blob9f0852d321bbed548fa57b5afdc3aad25c1dd943
1 /*
2 * Copyright (C) 2005 Junio C Hamano
3 */
4 #ifndef DIFF_H
5 #define DIFF_H
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,
12 unsigned mode,
13 const unsigned char *sha1,
14 const char *base,
15 const char *path);
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,
23 unsigned mode2,
24 const unsigned char *sha1,
25 const unsigned char *sha2,
26 const char *path1,
27 int status,
28 int score,
29 const char *path2);
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
39 extern void diff_setup(int flags);
41 #define DIFF_DETECT_RENAME 1
42 #define DIFF_DETECT_COPY 2
44 #define DIFF_PICKAXE_ALL 1
46 extern void diffcore_std(const char **paths,
47 int detect_rename, int rename_score,
48 const char *pickaxe, int pickaxe_opts,
49 int break_opt,
50 const char *orderfile, const char *filter);
52 extern void diffcore_std_no_resolve(const char **paths,
53 const char *pickaxe, int pickaxe_opts,
54 const char *orderfile, const char *filter);
56 extern int diff_queue_is_empty(void);
58 #define DIFF_FORMAT_HUMAN 0
59 #define DIFF_FORMAT_MACHINE 1
60 #define DIFF_FORMAT_PATCH 2
61 #define DIFF_FORMAT_NO_OUTPUT 3
63 extern void diff_flush(int output_style);
65 #endif /* DIFF_H */