diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2013-01-12 13:47:56 -0600 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2013-01-12 13:47:56 -0600 |
commit | 25743bd7c5f14f2287d9c4fdf953c978e3b16916 (patch) | |
tree | 7390d1d2d5d52f549329853903f381e58c1b1de6 /include/git2/index.h | |
parent | e2d2c6e57d122f381fb42b7df1c7a12819050490 (diff) | |
download | libgit2-25743bd7c5f14f2287d9c4fdf953c978e3b16916.tar.gz |
add an index_remove_bypath that removes conflicts, renamed add_from_workdir to match
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 |