diff options
| author | nulltoken <emeric.fermas@gmail.com> | 2012-04-09 03:22:14 +0200 |
|---|---|---|
| committer | nulltoken <emeric.fermas@gmail.com> | 2012-04-10 21:39:06 +0200 |
| commit | 4615f0f71ba849adef08f7a677842af3e0ee3d53 (patch) | |
| tree | d132b071c0ac313236401b4a2b71a5ee8aebf79d /include/git2/branch.h | |
| parent | 555aa453baefec98dbd026592b68214048bedac3 (diff) | |
| download | libgit2-4615f0f71ba849adef08f7a677842af3e0ee3d53.tar.gz | |
branch: add git_branch_move()
Diffstat (limited to 'include/git2/branch.h')
| -rw-r--r-- | include/git2/branch.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/git2/branch.h b/include/git2/branch.h index fa1c6f3ec..7f4945d1d 100644 --- a/include/git2/branch.h +++ b/include/git2/branch.h @@ -95,6 +95,28 @@ GIT_EXTERN(int) git_branch_list( git_repository *repo, unsigned int list_flags); +/** + * Move/rename an existing branch reference. + * + * @param repo Repository where lives the branch. + * + * @param old_branch_name Current name of the branch to be moved; + * this name is validated for consistency. + * + * @param new_branch_name Target name of the branch once the move + * is performed; this name is validated for consistency. + * + * @param force Overwrite existing branch. + * + * @return GIT_SUCCESS on success, GIT_ENOTFOUND if the branch + * doesn't exist or an error code. + */ +GIT_EXTERN(int) git_branch_move( + git_repository *repo, + const char *old_branch_name, + const char *new_branch_name, + int force); + /** @} */ GIT_END_DECL #endif |
