summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-06-06 15:01:45 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-30 15:42:32 +0200
commit3f8942052306a9d62521bdb6e6d5e7636bc5526e (patch)
tree739988344f450431fec435e2dfde626c75493ec2 /include/git2/remote.h
parenta2a23322193eeca5d2912c0b74c5374f8ec21737 (diff)
downloadlibgit2-3f8942052306a9d62521bdb6e6d5e7636bc5526e.tar.gz
remote: allow overriding the refspecs for download and fetch
With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 055f5e517..b714d3469 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -306,9 +306,12 @@ GIT_EXTERN(int) git_remote_ls(const git_remote_head ***out, size_t *size, git_r
* The .idx file will be created and both it and the packfile with be
* renamed to their final name.
*
+ * @param remote the remote
+ * @param refspecs the refspecs to use for this negotiation and
+ * download. Use NULL to use the base refspecs
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_remote_download(git_remote *remote);
+GIT_EXTERN(int) git_remote_download(git_remote *remote, const git_strarray *refspecs);
/**
* Check whether the remote is connected
@@ -373,6 +376,8 @@ GIT_EXTERN(int) git_remote_update_tips(
* disconnect and update the remote-tracking branches.
*
* @param remote the remote to fetch from
+ * @param refspecs the refspecs to use for this fetch. Pass NULL to
+ * use the base refspecs.
* @param signature The identity to use when updating reflogs
* @param reflog_message The message to insert into the reflogs. If NULL, the
* default is "fetch"
@@ -380,6 +385,7 @@ GIT_EXTERN(int) git_remote_update_tips(
*/
GIT_EXTERN(int) git_remote_fetch(
git_remote *remote,
+ const git_strarray *refspecs,
const git_signature *signature,
const char *reflog_message);