[libgit2-glib/wip/development: 1/4] Fix ggit_repository_create_reference
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development: 1/4] Fix ggit_repository_create_reference
- Date: Sat, 26 Apr 2014 19:25:49 +0000 (UTC)
commit bdb0d89f8f4d78629eb594bd0369b2b1cb50e061
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 26 16:20:01 2014 +0200
Fix ggit_repository_create_reference
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 b37d7a9..a5348c5 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -640,6 +640,8 @@ ggit_repository_lookup_reference (GgitRepository *repository,
* @repository: a #GgitRepository.
* @name: the name for the new #GgitRef.
* @oid: the #GgitOId pointed to by the reference.
+ * @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 object id reference.
@@ -653,6 +655,8 @@ GgitRef *
ggit_repository_create_reference (GgitRepository *repository,
const gchar *name,
GgitOId *oid,
+ GgitSignature *signature,
+ const gchar *log_message,
GError **error)
{
GgitRef *ref = NULL;
@@ -662,9 +666,13 @@ ggit_repository_create_reference (GgitRepository *repository,
g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), NULL);
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (oid != NULL, NULL);
+ g_return_val_if_fail (GGIT_IS_SIGNATURE (signature), NULL);
+ g_return_val_if_fail (log_message != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
ret = git_reference_create (&reference, _ggit_native_get (repository),
- name, _ggit_oid_get_oid (oid), FALSE);
+ name, _ggit_oid_get_oid (oid), FALSE,
+ _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 55e2c51..ed3347c 100644
--- a/libgit2-glib/ggit-repository.h
+++ b/libgit2-glib/ggit-repository.h
@@ -97,6 +97,8 @@ GgitRef *ggit_repository_lookup_reference (GgitRepository *re
GgitRef *ggit_repository_create_reference (GgitRepository *repository,
const gchar *name,
GgitOId *oid,
+ GgitSignature *signature,
+ const gchar *log_message,
GError **error);
GgitRef *ggit_repository_create_symbolic_reference
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]