From 3665ba8eeb4f8b2546517cd208e940b128dd8a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 27 Sep 2012 12:04:41 +0200 Subject: refspec: add git_refspec__free, remove git_refspec_parse The latter shouldn't be exposed and isn't used, git_refspec__parse supersedes it. Fix a leak in the refspec tests while we're at it. --- include/git2/refspec.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/git2') diff --git a/include/git2/refspec.h b/include/git2/refspec.h index 9e84aad99..1100e9022 100644 --- a/include/git2/refspec.h +++ b/include/git2/refspec.h @@ -19,14 +19,6 @@ */ GIT_BEGIN_DECL -/** - * Parse a refspec string and create a refspec object - * - * @param refspec pointer to the refspec structure to be used - * @param str the refspec as a string - */ -GIT_EXTERN(int) git_refspec_parse(git_refspec *refspec, const char *str); - /** * Get the source specifier * -- cgit v1.2.1 From 24f2f94e7defd20ab302c30d0d394248a6e43814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sat, 15 Sep 2012 08:07:24 +0200 Subject: fetch: use the include-tag capability This tells the remote to send us any tags that point to objects that we are downloading. --- include/git2/remote.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/git2') diff --git a/include/git2/remote.h b/include/git2/remote.h index a3913af5b..032bb30e5 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -304,6 +304,12 @@ struct git_remote_callbacks { */ GIT_EXTERN(void) git_remote_set_callbacks(git_remote *remote, git_remote_callbacks *callbacks); +enum { + GIT_REMOTE_DOWNLOAD_TAGS_UNSET, + GIT_REMOTE_DOWNLOAD_TAGS_NONE, + GIT_REMOTE_DOWNLOAD_TAGS_AUTO +}; + /** @} */ GIT_END_DECL #endif -- cgit v1.2.1 From f70e466f680a00deb4ff6229c0379a2b6ae1b68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 27 Sep 2012 11:58:35 +0200 Subject: remote: add accessors for the autotag setting --- include/git2/remote.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/git2') diff --git a/include/git2/remote.h b/include/git2/remote.h index 032bb30e5..1bca7a716 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -310,6 +310,23 @@ enum { GIT_REMOTE_DOWNLOAD_TAGS_AUTO }; +/** + * Retrieve the tag auto-follow setting + * + * @param remote the remote to query + * @return the auto-follow setting + */ +GIT_EXTERN(int) git_remote_autotag(git_remote *remote); + +/** + * Set the tag auto-follow setting + * + * @param remote the remote to configure + * @param value a GIT_REMOTE_DOWNLOAD_TAGS value + */ +GIT_EXTERN(void) git_remote_set_autotag(git_remote *remote, int value); + + /** @} */ GIT_END_DECL #endif -- cgit v1.2.1 From 3230a44f4c951cbaeadfa5ae111f6558298dfc61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sun, 30 Sep 2012 10:56:06 +0200 Subject: remote: support downloading all tags Also honor remote.$name.tagopt = --tags. --- include/git2/remote.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/git2') diff --git a/include/git2/remote.h b/include/git2/remote.h index 1bca7a716..c015289e8 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -307,7 +307,8 @@ GIT_EXTERN(void) git_remote_set_callbacks(git_remote *remote, git_remote_callbac enum { GIT_REMOTE_DOWNLOAD_TAGS_UNSET, GIT_REMOTE_DOWNLOAD_TAGS_NONE, - GIT_REMOTE_DOWNLOAD_TAGS_AUTO + GIT_REMOTE_DOWNLOAD_TAGS_AUTO, + GIT_REMOTE_DOWNLOAD_TAGS_ALL }; /** -- cgit v1.2.1