[libgit2-glib] Add ggit_fetch_get/set_download_tags
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Add ggit_fetch_get/set_download_tags
- Date: Thu, 30 Jul 2015 22:55:18 +0000 (UTC)
commit f0b1af567a03a4784aadda735224be93cf1b2fe5
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Fri Jul 31 00:54:52 2015 +0200
Add ggit_fetch_get/set_download_tags
libgit2-glib/ggit-fetch-options.c | 33 +++++++++++++++++++++++++++++++++
libgit2-glib/ggit-fetch-options.h | 4 ++++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-fetch-options.c b/libgit2-glib/ggit-fetch-options.c
index 6140508..6abffeb 100644
--- a/libgit2-glib/ggit-fetch-options.c
+++ b/libgit2-glib/ggit-fetch-options.c
@@ -159,4 +159,37 @@ ggit_fetch_options_set_remote_callbacks (GgitFetchOptions *options,
}
}
+/**
+ * ggit_fetch_options_get_download_tags:
+ * @options: a #GgitFetchOptions.
+ *
+ * Get how tags are being handled when fetching/downloading.
+ *
+ * Returns: a #GgitRemoteDownloadTagsType.
+ *
+ **/
+GgitRemoteDownloadTagsType
+ggit_fetch_options_get_download_tags (GgitFetchOptions *options)
+{
+ g_return_if_fail (options != NULL);
+ return (GgitRemoteDownloadTagsType)options->fetch_options.download_tags;
+}
+
+/**
+ * ggit_fetch_options_set_download_tags:
+ * @options: a #GgitFetchOptions.
+ * @download_tags: a #GgitRemoteDownloadTagsType.
+ *
+ * Set how tags are being handled when fetching/downloading.
+ *
+ **/
+void
+ggit_fetch_options_set_download_tags (GgitFetchOptions *options,
+ GgitRemoteDownloadTagsType download_tags)
+{
+ g_return_if_fail (options != NULL);
+
+ options->fetch_options.download_tags = (git_remote_autotag_option_t)download_tags;
+}
+
/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-fetch-options.h b/libgit2-glib/ggit-fetch-options.h
index f847379..edf456b 100644
--- a/libgit2-glib/ggit-fetch-options.h
+++ b/libgit2-glib/ggit-fetch-options.h
@@ -44,6 +44,10 @@ GgitRemoteCallbacks *ggit_fetch_options_get_remote_callbacks (GgitFetchOpt
void ggit_fetch_options_set_remote_callbacks (GgitFetchOptions *options,
GgitRemoteCallbacks *callbacks);
+GgitRemoteDownloadTagsType ggit_fetch_options_get_download_tags (GgitFetchOptions *options);
+void ggit_fetch_options_set_download_tags (GgitFetchOptions *options,
+ GgitRemoteDownloadTagsType
download_tags);
+
G_END_DECLS
#endif /* __GGIT_FETCH_OPTIONS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]