summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-09-16 16:54:37 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-10-02 06:41:42 +0200
commitfe3a40a4ff056400cde6e456211d6b5f2ec1008e (patch)
treee4e5c6348f169d4214309ca0c6f854b3ebff7abe /include/git2/remote.h
parentd19870d947eef17008ae0b4b7ebc9e9d0038a770 (diff)
downloadlibgit2-fe3a40a4ff056400cde6e456211d6b5f2ec1008e.tar.gz
remote: add a convenience 'fetch' function.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 83ad195f4..8c21870de 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -311,6 +311,17 @@ GIT_EXTERN(void) git_remote_free(git_remote *remote);
GIT_EXTERN(int) git_remote_update_tips(git_remote *remote);
/**
+ * Download new data and update tips
+ *
+ * Convenience function to connect to a remote, download the data,
+ * disconnect and update the remote-tracking branches.
+ *
+ * @param remote the remote to fetch from
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_remote_fetch(git_remote *remote);
+
+/**
* Return whether a string is a valid remote URL
*
* @param url the url to check