diff options
| author | Vicent Martà <vicent@github.com> | 2012-11-10 20:24:53 -0800 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-11-10 20:24:53 -0800 |
| commit | d18713fb4ad1ba3d18a75272e1c1c3eb45715aba (patch) | |
| tree | d7ccd21ac63656792ddc7d012076bf054fa18cf9 /src/index.c | |
| parent | 29c16698b2014e949af3fce2fb4b9d49a2f2d717 (diff) | |
| parent | f92bcaea499611bf0e6a71e845a2d74c790ea659 (diff) | |
| download | libgit2-d18713fb4ad1ba3d18a75272e1c1c3eb45715aba.tar.gz | |
Merge pull request #1056 from nulltoken/duplicate-tree-entries
Duplicate tree entries
Diffstat (limited to 'src/index.c')
| -rw-r--r-- | src/index.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/index.c b/src/index.c index fed067cb0..06bbcacee 100644 --- a/src/index.c +++ b/src/index.c @@ -959,6 +959,21 @@ void git_index_conflict_cleanup(git_index *index) git_vector_remove_matching(&index->entries, index_conflicts_match); } +int git_index_has_conflicts(git_index *index) +{ + unsigned int i; + git_index_entry *entry; + + assert(index); + + git_vector_foreach(&index->entries, i, entry) { + if (index_entry_stage(entry) > 0) + return 1; + } + + return 0; +} + unsigned int git_index_reuc_entrycount(git_index *index) { assert(index); |
