[libgit2-glib] Missing error parameter.



commit 3dd5a3240ec04014fb8f153dbd0ec1bde2ddd83e
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Mon Jan 14 17:02:12 2013 +0100

    Missing error parameter.

 libgit2-glib/ggit-tree.c |   10 ++++++++--
 libgit2-glib/ggit-tree.h |    5 +++--
 2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/libgit2-glib/ggit-tree.c b/libgit2-glib/ggit-tree.c
index e187163..a2914c4 100644
--- a/libgit2-glib/ggit-tree.c
+++ b/libgit2-glib/ggit-tree.c
@@ -163,6 +163,7 @@ ggit_tree_get_by_name (GgitTree    *tree,
  * ggit_tree_get_by_path:
  * @tree: a #GgitTree.
  * @path: a path.
+ * @error: a #GError for error reporting, or %NULL.
  *
  * Retrieves a tree entry contained in a tree or in any of its subtrees,
  * given its relative path.
@@ -171,8 +172,9 @@ ggit_tree_get_by_name (GgitTree    *tree,
  *
  **/
 GgitTreeEntry *
-ggit_tree_get_by_path (GgitTree    *tree,
-                       const gchar *path)
+ggit_tree_get_by_path (GgitTree     *tree,
+                       const gchar  *path,
+                       GError      **error)
 {
 	git_tree *t;
 	GgitTreeEntry *entry = NULL;
@@ -190,6 +192,10 @@ ggit_tree_get_by_path (GgitTree    *tree,
 	{
 		entry = _ggit_tree_entry_wrap (tree_entry, TRUE);
 	}
+	else
+	{
+		_ggit_error_set (error, ret);
+	}
 
 	return entry;
 }
diff --git a/libgit2-glib/ggit-tree.h b/libgit2-glib/ggit-tree.h
index e3e646a..97f35b0 100644
--- a/libgit2-glib/ggit-tree.h
+++ b/libgit2-glib/ggit-tree.h
@@ -72,8 +72,9 @@ guint          ggit_tree_size           (GgitTree *tree);
 GgitTreeEntry *ggit_tree_get_by_name    (GgitTree    *tree,
                                          const gchar *name);
 
-GgitTreeEntry *ggit_tree_get_by_path    (GgitTree    *tree,
-                                         const gchar *path);
+GgitTreeEntry *ggit_tree_get_by_path    (GgitTree     *tree,
+                                         const gchar  *path,
+                                         GError      **error);
 
 void           ggit_tree_walk           (GgitTree              *tree,
                                          GgitTreeWalkMode       mode,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]