]>
Commit | Line | Data |
---|---|---|
be3cfa85 JH |
1 | /* |
2 | * Copyright (C) 2005 Junio C Hamano | |
3 | */ | |
86436c28 JH |
4 | #ifndef DIFF_H |
5 | #define DIFF_H | |
6 | ||
be3cfa85 JH |
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); | |
86436c28 | 12 | |
be3cfa85 JH |
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 | }; | |
86436c28 | 27 | |
be3cfa85 JH |
28 | extern void run_external_diff(const char *name, |
29 | struct diff_spec *, struct diff_spec *); | |
86436c28 JH |
30 | |
31 | #endif /* DIFF_H */ |