[libgit2-glib/wip/development] Fix ggit_repository_reset



commit 1a53ebb3227aacc6ad8acb480378eb25448f7b71
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sat Apr 26 21:28:48 2014 +0200

    Fix ggit_repository_reset

 libgit2-glib/ggit-repository.c |   10 +++++++++-
 libgit2-glib/ggit-repository.h |    2 ++
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c
index 58277a1..b4136ea 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -1716,6 +1716,8 @@ ggit_repository_submodule_foreach (GgitRepository        *repository,
  * @repository: a #GgitRepository.
  * @target: the target #GgitObject which is a commit or a tag.
  * @reset_type: the #GgitResetType to perform.
+ * @signature: a #GgitSignature that will used to populate the reflog entry.
+ * @log_message: The one line long message to be appended to the reflog.
  * @error: a #GError for error reporting, or %NULL.
  *
  * Performs a reset of type @reset_type on @repository to @target,
@@ -1725,17 +1727,23 @@ void
 ggit_repository_reset (GgitRepository  *repository,
                        GgitObject      *target,
                        GgitResetType    reset_type,
+                       GgitSignature   *signature,
+                       const gchar     *log_message,
                        GError         **error)
 {
        gint ret;
 
        g_return_if_fail (GGIT_IS_REPOSITORY (repository));
        g_return_if_fail (GGIT_IS_OBJECT (target));
+       g_return_val_if_fail (GGIT_IS_SIGNATURE (signature), FALSE);
+       g_return_val_if_fail (log_message != NULL, FALSE);
        g_return_if_fail (error == NULL || *error == NULL);
 
        ret = git_reset (_ggit_native_get (repository),
                         _ggit_native_get (target),
-                        (git_reset_t)reset_type);
+                        (git_reset_t)reset_type,
+                        _ggit_native_get (signature),
+                        log_message);
 
        if (ret != GIT_OK)
        {
diff --git a/libgit2-glib/ggit-repository.h b/libgit2-glib/ggit-repository.h
index dc7fa16..d28972a 100644
--- a/libgit2-glib/ggit-repository.h
+++ b/libgit2-glib/ggit-repository.h
@@ -283,6 +283,8 @@ gboolean            ggit_repository_submodule_foreach  (GgitRepository
 void                ggit_repository_reset              (GgitRepository          *repository,
                                                         GgitObject              *target,
                                                         GgitResetType            reset_type,
+                                                        GgitSignature           *signature,
+                                                        const gchar             *log_message,
                                                         GError                 **error);
 
 GgitObject         *ggit_repository_revparse          (GgitRepository        *repository,


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