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 <rb@github.com>2012-09-25 07:52:34 +0400
committerRussell Belfer <rb@github.com>2012-09-26 03:35:05 +0400
commit5f69a31f7d706aa5788ad9937391577a66e3c77d (patch)
tree8201821372d02499f092b774a8fd521478564a7e /src/submodule.c
parent9a12a6256efa7da4b4245d0f2b7df6f3b84edabd (diff)
Initial implementation of new diff patch API
Replacing the `git_iterator` object, this creates a simple API for accessing the "patch" for any file pair in a diff list and then gives indexed access to the hunks in the patch and the lines in the hunk. This is the initial implementation of this revised API - it is still broken, but at least builds cleanly.
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/submodule.c b/src/submodule.c
index 5ae38bccd..e55e12863 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -1457,7 +1457,7 @@ static int submodule_wd_status(unsigned int *status, git_submodule *sm)
error = git_diff_index_to_tree(sm_repo, &opt, sm_head, &diff);
if (!error) {
- if (git_diff_entrycount(diff, -1) > 0)
+ if (git_diff_num_deltas(diff) > 0)
*status |= GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED;
git_diff_list_free(diff);
@@ -1474,12 +1474,13 @@ static int submodule_wd_status(unsigned int *status, git_submodule *sm)
error = git_diff_workdir_to_index(sm_repo, &opt, &diff);
if (!error) {
- int untracked = git_diff_entrycount(diff, GIT_DELTA_UNTRACKED);
+ int untracked =
+ git_diff_num_deltas_of_type(diff, GIT_DELTA_UNTRACKED);
if (untracked > 0)
*status |= GIT_SUBMODULE_STATUS_WD_UNTRACKED;
- if (git_diff_entrycount(diff, -1) - untracked > 0)
+ if ((git_diff_num_deltas(diff) - untracked) > 0)
*status |= GIT_SUBMODULE_STATUS_WD_WD_MODIFIED;
git_diff_list_free(diff);