diff options
author | Russell Belfer <rb@github.com> | 2012-08-09 19:43:25 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-08-24 11:00:27 -0700 |
commit | 5f4a61aea834fe25ce1596bc9c0e0b5e563aa98b (patch) | |
tree | da0237ee649e009b5f914dfdace54d26e819aaaf /include/git2/diff.h | |
parent | 0c8858de8c82bae3fd88513724689a07d231da7e (diff) | |
download | libgit2-5f4a61aea834fe25ce1596bc9c0e0b5e563aa98b.tar.gz |
Working implementation of git_submodule_status
This is a big redesign of the git_submodule_status API and the
implementation of the redesigned API. It also fixes a number of
bugs that I found in other parts of the submodule API while
writing the tests for the status part.
This also fixes a couple of bugs in the iterators that had not
been noticed before - one with iterating when there is a gitlink
(i.e. separate-work-dir) and one where I was treating anything
even vaguely submodule-like as a submodule, more aggressively
than core git does.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r-- | include/git2/diff.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h index 79ef7a49b..088e1ecfa 100644 --- a/include/git2/diff.h +++ b/include/git2/diff.h @@ -391,6 +391,21 @@ GIT_EXTERN(int) git_diff_print_patch( void *cb_data, git_diff_data_fn print_cb); +/** + * Query how many diff records are there in a diff list. + * + * You can optionally pass in a `git_delta_t` value if you want a count + * of just entries that match that delta type, or pass -1 for all delta + * records. + * + * @param diff A git_diff_list generated by one of the above functions + * @param delta_t A git_delta_t value to filter the count, or -1 for all records + * @return Count of number of deltas matching delta_t type + */ +GIT_EXTERN(int) git_diff_entrycount( + git_diff_list *diff, + int delta_t); + /**@}*/ |