[libgit2-glib/wip/development: 8/14] Fix ggit_repository_discover
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development: 8/14] Fix ggit_repository_discover
- Date: Sat, 26 Apr 2014 19:50:59 +0000 (UTC)
commit fe38a5de5df70ced5e524536e24d7587785844ca
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 26 21:20:08 2014 +0200
Fix ggit_repository_discover
libgit2-glib/ggit-repository.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c
index 392f4d2..b71f107 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -790,10 +790,10 @@ GFile *
ggit_repository_discover (GFile *location,
GError **error)
{
- gchar found_path[GIT_PATH_MAX];
- GFile *rep = NULL;
+ git_buf buf;
gchar *path;
gint ret;
+ GFile *rep = NULL;
g_return_val_if_fail (G_IS_FILE (location), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
@@ -802,8 +802,7 @@ ggit_repository_discover (GFile *location,
g_return_val_if_fail (path != NULL, NULL);
- ret = git_repository_discover (found_path,
- sizeof (found_path),
+ ret = git_repository_discover (&buf,
path,
0,
"");
@@ -812,7 +811,8 @@ ggit_repository_discover (GFile *location,
if (ret == GIT_OK)
{
- rep = g_file_new_for_path (found_path);
+ rep = g_file_new_for_path (buf.ptr);
+ git_buf_free (&buf);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]