[libgit2-glib] Allow null options
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Allow null options
- Date: Sun, 29 Aug 2021 10:36:38 +0000 (UTC)
commit 06899408a96cb0e24651cc1dc0c47e93e5a7d324
Author: George Barrett <bob bob131 so>
Date: Mon Dec 4 18:40:22 2017 +1100
Allow null options
libgit2-glib/ggit-repository.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c
index 1750ae2..1e095c8 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -3570,7 +3570,7 @@ ggit_repository_checkout_head (GgitRepository *repository,
gint ret;
g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), FALSE);
- g_return_val_if_fail (GGIT_IS_CHECKOUT_OPTIONS (options), FALSE);
+ g_return_val_if_fail (options == NULL || GGIT_IS_CHECKOUT_OPTIONS (options), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
ret = git_checkout_head (_ggit_native_get (repository),
@@ -3611,7 +3611,7 @@ ggit_repository_checkout_index (GgitRepository *repository,
g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), FALSE);
g_return_val_if_fail (index == NULL || GGIT_IS_INDEX (index), FALSE);
- g_return_val_if_fail (GGIT_IS_CHECKOUT_OPTIONS (options), FALSE);
+ g_return_val_if_fail (options == NULL || GGIT_IS_CHECKOUT_OPTIONS (options), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
ret = git_checkout_index (_ggit_native_get (repository),
@@ -3653,7 +3653,7 @@ ggit_repository_checkout_tree (GgitRepository *repository,
g_return_val_if_fail (GGIT_IS_REPOSITORY (repository), FALSE);
g_return_val_if_fail (tree == NULL || GGIT_IS_OBJECT (tree), FALSE);
- g_return_val_if_fail (GGIT_IS_CHECKOUT_OPTIONS (options), FALSE);
+ g_return_val_if_fail (options == NULL || GGIT_IS_CHECKOUT_OPTIONS (options), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
ret = git_checkout_tree (_ggit_native_get (repository),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]