diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-05 10:13:52 +0300 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-06-22 18:02:55 +0300 |
commit | 486ba4cdd3d30c202d0c7ed202d6122a7e2b5164 (patch) | |
tree | 496063688afd170bb5e828cdbf27414b36df0964 /include | |
parent | 4e63642321bbea96b6a06ac28ac3c3e447f15df3 (diff) |
submodule: make `_set_branch()` affect the configuration
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/submodule.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 63572150d..03b9efe96 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -373,20 +373,17 @@ 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. + * Set the branch for the submodule in the configuration * - * 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 + * After calling this, you may wish to call `git_submodule_sync()` to * write the changes to the checked out submodule repository. * - * @param submodule Pointer to the submodule object + * @param repo the repository to affect + * @param name the name of the submodule to configure * @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); +GIT_EXTERN(int) git_submodule_set_branch(git_repository *repo, const char *name, const char *branch); /** * Set the URL for the submodule. |