diff options
| author | Patrick Steinhardt <ps@pks.im> | 2015-03-18 11:45:18 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2015-04-12 10:51:08 +0200 |
| commit | 129788a623816e06eb502235451beeb87472cee0 (patch) | |
| tree | 8f84f9ca16e3e4021f3a031182e173d31524ea63 /include/git2/submodule.h | |
| parent | 7568bdf4abf8c99c4bf0a87ff4ce6967c333e70a (diff) | |
| download | libgit2-129788a623816e06eb502235451beeb87472cee0.tar.gz | |
Implement git_submodule_set_branch.
Diffstat (limited to 'include/git2/submodule.h')
| -rw-r--r-- | include/git2/submodule.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 245b2a2c1..86f5fef22 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -371,6 +371,22 @@ GIT_EXTERN(int) git_submodule_resolve_url(git_buf *out, git_repository *repo, co GIT_EXTERN(const char *) git_submodule_branch(git_submodule *submodule); /** + * Set the branch for the submodule. + * + * This sets the branch in memory for the submodule. This will be used for + * any following submodule actions while this submodule data is in memory. + * + * After calling this, you may wish to call `git_submodule_save()` to write + * the changes back to the ".gitmodules" file and `git_submodule_sync()` to + * write the changes to the checked out submodule repository. + * + * @param submodule Pointer to the submodule object + * @param branch Branch that should be used for the submodule + * @return 0 on success, <0 on failure + */ +GIT_EXTERN(int) git_submodule_set_branch(git_submodule *submodule, const char *branch); + +/** * Set the URL for the submodule. * * This sets the URL in memory for the submodule. This will be used for |
