diff options
author | Vicent Martà <tanoku@gmail.com> | 2011-05-18 17:04:12 -0700 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2011-05-18 17:04:12 -0700 |
commit | 7b134cfebe3d37f3679119b447edcad12e6beec1 (patch) | |
tree | e2ef3c8c2dcebd8ab414d6194cb48770e5fc8d67 /include/git2 | |
parent | 7d6274baa94d99d61980fa5a6e45b1ab5d80a349 (diff) | |
parent | 9d27fd3bee887abb4570351b5b3805e670422263 (diff) | |
download | libgit2-7b134cfebe3d37f3679119b447edcad12e6beec1.tar.gz |
Merge pull request #141 from jpfender/unmerged
index: Add API for unmerged entries
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/index.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/git2/index.h b/include/git2/index.h index 2d8975ca1..2e5c17bc3 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -101,6 +101,12 @@ typedef struct git_index_entry { char *path; } git_index_entry; +/** Representation of an unmerged file entry in the index. */ +typedef struct git_index_entry_unmerged { + unsigned int mode[3]; + git_oid oid[3]; + char *path; +} git_index_entry_unmerged; /** * Create a new Git index object as a memory representation @@ -264,6 +270,24 @@ GIT_EXTERN(git_index_entry *) git_index_get(git_index *index, int n); */ GIT_EXTERN(unsigned int) git_index_entrycount(git_index *index); +/** + * Get the count of unmerged entries currently in the index + * + * @param index an existing index object + * @return integer of count of current unmerged entries + */ +GIT_EXTERN(unsigned int) git_index_unmerged_entrycount(git_index *index); + +/** + * Get an unmerged entry from the index. + * + * @param entry the pointer to the new unmerged entry + * @param index an existing index object + * @param path path to search + * @return 0 on success, otherwise an error code + */ +GIT_EXTERN(int) git_index_get_unmerged(git_index_entry_unmerged **entry, git_index *index, const char *path); + /** @} */ GIT_END_DECL |