[libgit2-glib/wip/development: 9/14] Fix ggit_repository_create_branch
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development: 9/14] Fix ggit_repository_create_branch
- Date: Sat, 26 Apr 2014 19:51:04 +0000 (UTC)
commit e7070475c25132c30472bc76eaa32b0e1a921be2
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 26 21:23:10 2014 +0200
Fix ggit_repository_create_branch
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 b71f107..58277a1 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -1372,6 +1372,8 @@ ggit_repository_list_tags (GgitRepository *repository,
* @branch_name: the name of the branch.
* @target: a #GgitObject.
* @flags: a #GgitCreateFlags.
+ * @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.
*
* Creates a new branch pointing at a target commit.
@@ -1384,6 +1386,8 @@ ggit_repository_create_branch (GgitRepository *repository,
const gchar *branch_name,
GgitObject *target,
GgitCreateFlags flags,
+ GgitSignature *signature,
+ const gchar *log_message,
GError **error)
{
gboolean force;
@@ -1393,6 +1397,8 @@ ggit_repository_create_branch (GgitRepository *repository,
g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), FALSE);
g_return_val_if_fail (branch_name != NULL, FALSE);
g_return_val_if_fail (GGIT_IS_OBJECT (target), FALSE);
+ g_return_val_if_fail (GGIT_IS_SIGNATURE (signature), FALSE);
+ g_return_val_if_fail (log_message != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
force = flags & GGIT_CREATE_FORCE;
@@ -1401,7 +1407,9 @@ ggit_repository_create_branch (GgitRepository *repository,
_ggit_native_get (repository),
branch_name,
_ggit_native_get (target),
- force ? 1 : 0);
+ force ? 1 : 0,
+ _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 b3b2445..dc7fa16 100644
--- a/libgit2-glib/ggit-repository.h
+++ b/libgit2-glib/ggit-repository.h
@@ -200,6 +200,8 @@ GgitBranch *ggit_repository_create_branch (GgitRepository *re
const gchar *branch_name,
GgitObject *target,
GgitCreateFlags flags,
+ GgitSignature *signature,
+ const gchar *log_message,
GError **error);
GgitBranchEnumerator *ggit_repository_enumerate_branches (GgitRepository *repository,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]