[libgit2-glib/wip/development: 12/14] Fix ggit_submodule_reload
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development: 12/14] Fix ggit_submodule_reload
- Date: Sat, 26 Apr 2014 19:51:19 +0000 (UTC)
commit 9649e2aa5661184f914b91dbb7d78de61014742f
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 26 21:41:24 2014 +0200
Fix ggit_submodule_reload
libgit2-glib/ggit-submodule.c | 4 +++-
libgit2-glib/ggit-submodule.h | 1 +
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libgit2-glib/ggit-submodule.c b/libgit2-glib/ggit-submodule.c
index d20fe04..8774699 100644
--- a/libgit2-glib/ggit-submodule.c
+++ b/libgit2-glib/ggit-submodule.c
@@ -464,6 +464,7 @@ ggit_submodule_sync (GgitSubmodule *submodule,
/**
* ggit_submodule_reload:
* @submodule: a #GgitSubmodule.
+ * @force: reload even if the data doesn't seem out of date.
* @error: a #GError for error reporting, or %NULL.
*
* Rereads submodule info from config, index, and HEAD.
@@ -471,6 +472,7 @@ ggit_submodule_sync (GgitSubmodule *submodule,
*/
void
ggit_submodule_reload (GgitSubmodule *submodule,
+ gboolean force,
GError **error)
{
gint ret;
@@ -478,7 +480,7 @@ ggit_submodule_reload (GgitSubmodule *submodule,
g_return_if_fail (submodule != NULL);
g_return_if_fail (error == NULL || *error == NULL);
- ret = git_submodule_reload (submodule->submodule);
+ ret = git_submodule_reload (submodule->submodule, force ? 1 : 0);
if (ret != GIT_OK)
{
diff --git a/libgit2-glib/ggit-submodule.h b/libgit2-glib/ggit-submodule.h
index 855409f..c79dce3 100644
--- a/libgit2-glib/ggit-submodule.h
+++ b/libgit2-glib/ggit-submodule.h
@@ -82,6 +82,7 @@ void ggit_submodule_sync (GgitSubmodule
GError **error);
void ggit_submodule_reload (GgitSubmodule *submodule,
+ gboolean force,
GError **error);
GgitSubmoduleStatus ggit_submodule_get_status (GgitSubmodule *submodule,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]