remote: add git_remote_add()

Helper function to create a remote with the default settings
This commit is contained in:
Carlos Martín Nieto
2012-05-08 21:36:40 +02:00
parent 3df9cc5922
commit a209a025c6
3 changed files with 47 additions and 0 deletions
+10
View File
@@ -218,6 +218,16 @@ GIT_EXTERN(int) git_remote_supported_url(const char* url);
*/
GIT_EXTERN(int) git_remote_list(git_strarray *remotes_list, git_repository *repo);
/**
* Add a remote with the default fetch refspec to the repository's configuration
*
* @param out the resulting remote
* @param repo the repository in which to create the remote
* @param name the remote's name
* @param url the remote's url
*/
GIT_EXTERN(int) git_remote_add(git_remote **out, git_repository *repo, const char *name, const char *url);
/** @} */
GIT_END_DECL
#endif