summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-04-26 01:22:47 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-26 01:22:47 (GMT)
commit86436c28289eedd2ee9b7f9c872a0ed039866a0f (patch)
tree780ecf60c2d10084ab26758c093319d0c6c86480 /diff.h
parentab7df1874d87d3f7494397442e67e900b580a346 (diff)
downloadgit-86436c28289eedd2ee9b7f9c872a0ed039866a0f.zip
git-86436c28289eedd2ee9b7f9c872a0ed039866a0f.tar.gz
git-86436c28289eedd2ee9b7f9c872a0ed039866a0f.tar.bz2
[PATCH] Split external diff command interface to a separate file.
With this patch, the non-core'ish part of show-diff command that invokes an external "diff" comand to obtain patches is split into a separate file. The next patch will introduce a new command, diff-tree-helper, which uses this common diff interface to format diff-tree and diff-cache output into a patch form. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/diff.h b/diff.h
new file mode 100644
index 0000000..56ca373
--- /dev/null
+++ b/diff.h
@@ -0,0 +1,17 @@
+#ifndef DIFF_H
+#define DIFF_H
+
+extern void prepare_diff_cmd(void);
+
+extern void show_differences(const char *name, /* filename on the filesystem */
+ const char *label, /* diff label to use */
+ void *old_contents, /* contents in core */
+ unsigned long long old_size, /* size in core */
+ int reverse /* 0: diff core file
+ 1: diff file core */);
+
+extern void show_diff_empty(const unsigned char *sha1,
+ const char *name,
+ int reverse);
+
+#endif /* DIFF_H */