diff options
author | Ben Straub <bs@github.com> | 2013-10-28 22:04:58 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-10-28 22:04:58 +0400 |
commit | 42c8f8f807fe986534e0cbabbfabc32cb4eb9077 (patch) | |
tree | fa76cb66e6d49855be344026b1cbe31d03962916 /tests-clar/refs/reflog/drop.c | |
parent | a7d28f40a2a01382b76c55ca0a0672c177adaf69 (diff) | |
parent | 5c50f22a93c78190fb7d81802199ff9defc8cf55 (diff) |
Merge remote-tracking branch 'libgit2/development' into blame
Diffstat (limited to 'tests-clar/refs/reflog/drop.c')
-rw-r--r-- | tests-clar/refs/reflog/drop.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/tests-clar/refs/reflog/drop.c b/tests-clar/refs/reflog/drop.c index 21cc847bf..916bd9933 100644 --- a/tests-clar/refs/reflog/drop.c +++ b/tests-clar/refs/reflog/drop.c @@ -8,15 +8,10 @@ static size_t entrycount; void test_refs_reflog_drop__initialize(void) { - git_reference *ref; - g_repo = cl_git_sandbox_init("testrepo.git"); - cl_git_pass(git_reference_lookup(&ref, g_repo, "HEAD")); - git_reflog_read(&g_reflog, ref); + git_reflog_read(&g_reflog, g_repo, "HEAD"); entrycount = git_reflog_entrycount(g_reflog); - - git_reference_free(ref); } void test_refs_reflog_drop__cleanup(void) @@ -106,19 +101,15 @@ void test_refs_reflog_drop__can_drop_all_the_entries(void) void test_refs_reflog_drop__can_persist_deletion_on_disk(void) { - git_reference *ref; - cl_assert(entrycount > 2); - cl_git_pass(git_reference_lookup(&ref, g_repo, g_reflog->ref_name)); cl_git_pass(git_reflog_drop(g_reflog, 0, 1)); cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog)); cl_git_pass(git_reflog_write(g_reflog)); git_reflog_free(g_reflog); - git_reflog_read(&g_reflog, ref); - git_reference_free(ref); + git_reflog_read(&g_reflog, g_repo, "HEAD"); cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog)); } |