[libgit2-glib] remote: fix download method for api break
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] remote: fix download method for api break
- Date: Sun, 18 Jan 2015 16:17:27 +0000 (UTC)
commit e6ecf16001fc930b8287446ae79411aded98bd91
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Jan 18 17:17:00 2015 +0100
remote: fix download method for api break
libgit2-glib/ggit-remote.c | 11 ++++++++---
libgit2-glib/ggit-remote.h | 5 +++--
2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/libgit2-glib/ggit-remote.c b/libgit2-glib/ggit-remote.c
index aa5e986..2d0cdf2 100644
--- a/libgit2-glib/ggit-remote.c
+++ b/libgit2-glib/ggit-remote.c
@@ -584,6 +584,7 @@ ggit_remote_disconnect (GgitRemote *remote)
/**
* ggit_remote_download:
* @remote: a #GgitRemote.
+ * @specs: (array zero-terminated=1) (allow-none): the ref specs.
* @error: a #GError for error reporting, or %NULL.
*
* Connect to the remote if not yet connected, negotiate with the remote
@@ -593,17 +594,21 @@ ggit_remote_disconnect (GgitRemote *remote)
* Returns: %TRUE if successful, %FALSE otherwise.
*/
gboolean
-ggit_remote_download (GgitRemote *remote,
- GError **error)
+ggit_remote_download (GgitRemote *remote,
+ const gchar * const *specs,
+ GError **error)
{
gint ret;
+ git_strarray gspecs;
g_return_val_if_fail (GGIT_IS_REMOTE (remote), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
reset_transfer_progress (remote, FALSE);
- ret = git_remote_download (_ggit_native_get (remote));
+ ggit_utils_get_git_strarray_from_str_array (specs, &gspecs);
+
+ ret = git_remote_download (_ggit_native_get (remote), &gspecs);
reset_transfer_progress (remote, TRUE);
diff --git a/libgit2-glib/ggit-remote.h b/libgit2-glib/ggit-remote.h
index 62137fa..e3cc14b 100644
--- a/libgit2-glib/ggit-remote.h
+++ b/libgit2-glib/ggit-remote.h
@@ -104,8 +104,9 @@ gboolean ggit_remote_get_connected (GgitRemote *remot
void ggit_remote_disconnect (GgitRemote *remote);
-gboolean ggit_remote_download (GgitRemote *remote,
- GError **error);
+gboolean ggit_remote_download (GgitRemote *remote,
+ const gchar * const *specs,
+ GError **error);
gboolean ggit_remote_update_tips (GgitRemote *remote,
GgitSignature *signature,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]