Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-02-29 04:14:47 +0400
committerRussell Belfer <arrbee@arrbee.com>2012-03-03 03:49:29 +0400
commit74fa4bfae37e9d7c9e35550c881b114d7a83c4fa (patch)
tree98184643a8c42b1402e4b33f835eac424fe88768 /src/diff.h
parent760db29c456ef2029a81d577d95a3fafb37ce5c6 (diff)
Update diff to use iterators
This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
Diffstat (limited to 'src/diff.h')
-rw-r--r--src/diff.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/diff.h b/src/diff.h
index b0f1ebbe8..7d69199ea 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -10,15 +10,15 @@
#include <stdio.h>
#include "vector.h"
#include "buffer.h"
+#include "iterator.h"
+#include "repository.h"
struct git_diff_list {
git_repository *repo;
git_diff_options opts;
- git_vector files; /* vector of git_diff_file_delta */
-
- /* the following are just used while processing the diff list */
- git_buf pfx;
- git_status_t status;
+ git_vector deltas; /* vector of git_diff_file_delta */
+ git_iterator_type_t old_src;
+ git_iterator_type_t new_src;
};
#endif