1 /*
2 * Copyright (C) 2005 Junio C Hamano
3 */
4 #ifndef DIFF_H
5 #define DIFF_H
7 /* These two are for backward compatibility with show-diff;
8 * new users should not use them.
9 */
10 extern void show_differences(const struct cache_entry *ce, int reverse);
11 extern void show_diff_empty(const struct cache_entry *ce, int reverse);
13 struct diff_spec {
14 union {
15 const char *name; /* path on the filesystem */
16 unsigned char sha1[20]; /* blob object ID */
17 } u;
18 unsigned short mode; /* file mode */
19 unsigned sha1_valid : 1; /* if true, use u.sha1 and trust mode.
20 * (however with a NULL SHA1, read them
21 * from the file!).
22 * if false, use u.name and read mode from
23 * the filesystem.
24 */
25 unsigned file_valid : 1; /* if false the file does not even exist */
26 };
28 extern void run_external_diff(const char *name,
29 struct diff_spec *, struct diff_spec *);
31 #endif /* DIFF_H */