date.c: only use the TZ names if we don't have anything better.
[git/git.git] / diff.h
CommitLineData
be3cfa85
JH
1/*
2 * Copyright (C) 2005 Junio C Hamano
3 */
86436c28
JH
4#ifndef DIFF_H
5#define DIFF_H
6
77eb2720
JH
7extern void diff_addremove(int addremove,
8 unsigned mode,
9 const unsigned char *sha1,
10 const char *base,
11 const char *path);
12
13extern void diff_change(unsigned mode1, unsigned mode2,
14 const unsigned char *sha1,
15 const unsigned char *sha2,
16 const char *base, const char *path);
17
18extern void diff_unmerge(const char *path);
19
20/* These are for diff-tree-helper */
86436c28 21
be3cfa85
JH
22struct diff_spec {
23 union {
24 const char *name; /* path on the filesystem */
25 unsigned char sha1[20]; /* blob object ID */
26 } u;
27 unsigned short mode; /* file mode */
28 unsigned sha1_valid : 1; /* if true, use u.sha1 and trust mode.
29 * (however with a NULL SHA1, read them
30 * from the file!).
31 * if false, use u.name and read mode from
32 * the filesystem.
33 */
34 unsigned file_valid : 1; /* if false the file does not even exist */
35};
86436c28 36
be3cfa85
JH
37extern void run_external_diff(const char *name,
38 struct diff_spec *, struct diff_spec *);
86436c28
JH
39
40#endif /* DIFF_H */