diff options
author | Vicent Martà <vicent@github.com> | 2013-01-17 16:56:57 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-01-17 16:56:57 -0800 |
commit | ddcb28a41f3774e26fc6ae0a7174a5565e4749ce (patch) | |
tree | a80eb78456d71dadeb13da82a53a31022b697f94 /include/git2/index.h | |
parent | 3a93ab90658ea46fd2f581172b313a1de711ce65 (diff) | |
parent | 25743bd7c5f14f2287d9c4fdf953c978e3b16916 (diff) | |
download | libgit2-ddcb28a41f3774e26fc6ae0a7174a5565e4749ce.tar.gz |
Merge pull request #1239 from ethomson/index_remove
add an index_remove_bypath that removes conflicts
Diffstat (limited to 'include/git2/index.h')
-rw-r--r-- | include/git2/index.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/git2/index.h b/include/git2/index.h index 2df5103fd..ad6d19733 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -362,7 +362,7 @@ GIT_EXTERN(int) git_index_entry_stage(const git_index_entry *entry); /**@{*/ /** - * Add or update an index entry from a file in disk + * Add or update an index entry from a file on disk * * The file `path` must be relative to the repository's * working folder and must be readable. @@ -381,7 +381,23 @@ GIT_EXTERN(int) git_index_entry_stage(const git_index_entry *entry); * @param path filename to add * @return 0 or an error code */ -GIT_EXTERN(int) git_index_add_from_workdir(git_index *index, const char *path); +GIT_EXTERN(int) git_index_add_bypath(git_index *index, const char *path); + +/** + * Remove an index entry corresponding to a file on disk + * + * The file `path` must be relative to the repository's + * working folder. It may exist. + * + * If this file currently is the result of a merge conflict, this + * file will no longer be marked as conflicting. The data about + * the conflict will be moved to the "resolve undo" (REUC) section. + * + * @param index an existing index object + * @param path filename to remove + * @return 0 or an error code + */ +GIT_EXTERN(int) git_index_remove_bypath(git_index *index, const char *path); /** * Find the first index of any entries which point to given |