summaryrefslogtreecommitdiff
path: root/src/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-02-02 18:03:43 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-03-02 15:49:28 -0800
commit65b09b1deddec64fa5639e9fea10c048d31901fa (patch)
tree426f17e38fceaed529cd5e8a2b1544e469d98fb7 /src/diff.h
parentcd33323b7251e0bb15c5ee476e918859b661cc5f (diff)
downloadlibgit2-65b09b1deddec64fa5639e9fea10c048d31901fa.tar.gz
Implement diff lists and formatters
This reworks the diff API to separate the steps of producing a diff descriptions from formatting the diff. This will allow us to share diff output code with the various diff creation scenarios and will allow us to implement rename detection as an optional pass that can be run on a diff list.
Diffstat (limited to 'src/diff.h')
-rw-r--r--src/diff.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/diff.h b/src/diff.h
new file mode 100644
index 000000000..1bb5c36f0
--- /dev/null
+++ b/src/diff.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2009-2012 the libgit2 contributors
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_diff_h__
+#define INCLUDE_diff_h__
+
+#include <stdio.h>
+#include "vector.h"
+#include "buffer.h"
+
+struct git_diff_list {
+ git_repository *repo;
+ git_diff_options opts;
+ git_buf pfx;
+ git_vector files; /* vector of git_diff_file_delta */
+};
+
+#endif
+