Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-07-04 13:58:04 +0400
committernulltoken <emeric.fermas@gmail.com>2012-07-07 14:15:28 +0400
commit75261421ec00b6dc0a72931ed7640743a4998c7d (patch)
tree87c013f55be20c3fe17169189e6ffb38bdc1b456 /tests-clar/refs/reflog.c
parentb6bfd96fdd0cffc37c843cbf0f7c43efdbe96ef9 (diff)
refs: add git_reference_has_log()
Diffstat (limited to 'tests-clar/refs/reflog.c')
-rw-r--r--tests-clar/refs/reflog.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests-clar/refs/reflog.c b/tests-clar/refs/reflog.c
index a945b4789..05f3786bb 100644
--- a/tests-clar/refs/reflog.c
+++ b/tests-clar/refs/reflog.c
@@ -145,3 +145,20 @@ void test_refs_reflog__renaming_the_reference_moves_the_reflog(void)
git_buf_free(&moved_log_path);
git_buf_free(&master_log_path);
}
+static void assert_has_reflog(bool expected_result, const char *name)
+{
+ git_reference *ref;
+
+ cl_git_pass(git_reference_lookup(&ref, g_repo, name));
+
+ cl_assert_equal_i(expected_result, git_reference_has_log(ref));
+
+ git_reference_free(ref);
+}
+
+void test_refs_reflog__reference_has_reflog(void)
+{
+ assert_has_reflog(true, "HEAD");
+ assert_has_reflog(true, "refs/heads/master");
+ assert_has_reflog(false, "refs/heads/subtrees");
+}