[libgit2-glib] ggit_submodule_set_fetch_recurse has been moved to repository
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] ggit_submodule_set_fetch_recurse has been moved to repository
- Date: Mon, 13 Jul 2015 20:10:32 +0000 (UTC)
commit 2d8b710e0234c166fb1b3942fb35ff6ac7dd4330
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Jul 13 22:09:53 2015 +0200
ggit_submodule_set_fetch_recurse has been moved to repository
The new name is ggit_repository_set_submodule_fetch_recurse
libgit2-glib/ggit-repository.c | 31 +++++++++++++++++++++++++++++++
libgit2-glib/ggit-repository.h | 5 +++++
libgit2-glib/ggit-submodule.c | 20 --------------------
libgit2-glib/ggit-submodule.h | 3 ---
4 files changed, 36 insertions(+), 23 deletions(-)
---
diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c
index 98a8e7e..66adfc6 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -2084,6 +2084,37 @@ ggit_repository_set_submodule_url (GgitRepository *repository,
}
/**
+ * ggit_repository_set_submodule_fetch_recurse:
+ * @repository: a #GgitRepository.
+ * @name: the name of the submodule to configure.
+ * @fetch_recurse_submodules: a #GgitSubmoduleRecurse.
+ * @error: a #GError for error reporting, or %NULL.
+ *
+ * Sets the submodule.'name'.fetchRecurseSubmodules value for
+ * the submodule. This setting won't affect any existing instances..
+ */
+void
+ggit_repository_set_submodule_fetch_recurse (GgitRepository *repository,
+ const gchar *name,
+ GgitSubmoduleRecurse fetch_recurse_submodules,
+ GError **error)
+{
+ gint ret;
+
+ g_return_if_fail (GGIT_IS_REPOSITORY (repository));
+ g_return_if_fail (error == NULL || *error == NULL);
+
+ ret = git_submodule_set_fetch_recurse_submodules (_ggit_native_get (repository),
+ name,
+ (git_submodule_recurse_t)fetch_recurse_submodules);
+
+ if (ret != GIT_OK)
+ {
+ _ggit_error_set (error, ret);
+ }
+}
+
+/**
* ggit_repository_get_submodule_status:
* @repository: a #GgitRepository.
* @name: the name of the submodule.
diff --git a/libgit2-glib/ggit-repository.h b/libgit2-glib/ggit-repository.h
index 7b387e6..3057592 100644
--- a/libgit2-glib/ggit-repository.h
+++ b/libgit2-glib/ggit-repository.h
@@ -315,6 +315,11 @@ void ggit_repository_set_submodule_url (GgitRepository
const gchar *url,
GError **error);
+void ggit_repository_set_submodule_fetch_recurse (GgitRepository *repository,
+ const gchar *name,
+ GgitSubmoduleRecurse
fetch_recurse_submodules,
+ GError **error);
+
GgitSubmoduleStatus ggit_repository_get_submodule_status (GgitRepository *repository,
const gchar *name,
GgitSubmoduleIgnore ignore,
diff --git a/libgit2-glib/ggit-submodule.c b/libgit2-glib/ggit-submodule.c
index 74cf158..64a640d 100644
--- a/libgit2-glib/ggit-submodule.c
+++ b/libgit2-glib/ggit-submodule.c
@@ -356,26 +356,6 @@ ggit_submodule_get_fetch_recurse (GgitSubmodule *submodule)
}
/**
- * ggit_submodule_set_fetch_recurse:
- * @submodule: a #GgitSubmodule.
- * @fetch_recurse: %TRUE to fetch recurse submodules.
- *
- * Sets the submodule.'name'.fetchRecurseSubmodules value for
- * the submodule. You should call ggit_submodule_save() if you want
- * to persist the new value.
- *
- * Returns: the old value.
- */
-gboolean
-ggit_submodule_set_fetch_recurse (GgitSubmodule *submodule,
- gboolean fetch_recurse)
-{
- g_return_val_if_fail (submodule != NULL, FALSE);
-
- return git_submodule_set_fetch_recurse_submodules (submodule->submodule, fetch_recurse);
-}
-
-/**
* ggit_submodule_init:
* @submodule: a #GgitSubmodule.
* @overwrite: forces existing entries to be updated.
diff --git a/libgit2-glib/ggit-submodule.h b/libgit2-glib/ggit-submodule.h
index fa21d92..1ab89ed 100644
--- a/libgit2-glib/ggit-submodule.h
+++ b/libgit2-glib/ggit-submodule.h
@@ -67,9 +67,6 @@ GgitSubmoduleUpdate ggit_submodule_set_update (GgitSubmodule
gboolean ggit_submodule_get_fetch_recurse (GgitSubmodule *submodule);
-gboolean ggit_submodule_set_fetch_recurse (GgitSubmodule *submodule,
- gboolean fetch_recurse);
-
void ggit_submodule_init (GgitSubmodule *submodule,
gboolean overwrite,
GError **error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]