Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1321c9

Browse files
committed
tests/libgit2: conditional checks for the "files"-backend
We have a bunch of checks for properties of the "files" reference backend: - Whether a specific reference has been packed or whether it still exists as a loose reference. - Whether empty ref directories get pruned. - Whether we properly fsync data to disk. These checks continue to be sensible for that backend, but for any other backend they plain don't work. Adapt the tests so that we only run them in case the repository uses the "files" backend.
1 parent baf48df commit f1321c9

File tree

10 files changed

+106
-40
lines changed

10 files changed

+106
-40
lines changed

tests/libgit2/refs/branches/delete.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ void test_refs_branches_delete__removes_empty_folders(void)
171171
git_str ref_folder = GIT_STR_INIT;
172172
git_str reflog_folder = GIT_STR_INIT;
173173

174+
if (!cl_repo_has_ref_format(repo, "files"))
175+
cl_skip();
176+
174177
/* Create a new branch with a nested name */
175178
cl_git_pass(git_oid_from_string(&commit_id, "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", GIT_OID_SHA1));
176179
cl_git_pass(git_commit_lookup(&commit, repo, &commit_id));

tests/libgit2/refs/create.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ void test_refs_create__symbolic(void)
4242
/* Ensure the reference can be looked-up... */
4343
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head_tracker));
4444
cl_assert(git_reference_type(looked_up_ref) & GIT_REFERENCE_SYMBOLIC);
45-
cl_assert(reference_is_packed(looked_up_ref) == 0);
45+
if (cl_repo_has_ref_format(g_repo, "files"))
46+
cl_assert(reference_is_packed(looked_up_ref) == 0);
4647
cl_assert_equal_s(looked_up_ref->name, new_head_tracker);
4748

4849
/* ...peeled.. */
@@ -92,7 +93,8 @@ void test_refs_create__symbolic_with_arbitrary_content(void)
9293
/* Ensure the reference can be looked-up... */
9394
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head_tracker));
9495
cl_assert(git_reference_type(looked_up_ref) & GIT_REFERENCE_SYMBOLIC);
95-
cl_assert(reference_is_packed(looked_up_ref) == 0);
96+
if (cl_repo_has_ref_format(g_repo, "files"))
97+
cl_assert(reference_is_packed(looked_up_ref) == 0);
9698
cl_assert_equal_s(looked_up_ref->name, new_head_tracker);
9799
git_reference_free(looked_up_ref);
98100

@@ -105,7 +107,8 @@ void test_refs_create__symbolic_with_arbitrary_content(void)
105107
/* Ensure the reference can be looked-up... */
106108
cl_git_pass(git_reference_lookup(&looked_up_ref, repo2, new_head_tracker));
107109
cl_assert(git_reference_type(looked_up_ref) & GIT_REFERENCE_SYMBOLIC);
108-
cl_assert(reference_is_packed(looked_up_ref) == 0);
110+
if (cl_repo_has_ref_format(g_repo, "files"))
111+
cl_assert(reference_is_packed(looked_up_ref) == 0);
109112
cl_assert_equal_s(looked_up_ref->name, new_head_tracker);
110113

111114
/* Ensure the target is what we expect it to be */
@@ -153,7 +156,8 @@ void test_refs_create__oid(void)
153156
/* Ensure the reference can be looked-up... */
154157
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, new_head));
155158
cl_assert(git_reference_type(looked_up_ref) & GIT_REFERENCE_DIRECT);
156-
cl_assert(reference_is_packed(looked_up_ref) == 0);
159+
if (cl_repo_has_ref_format(g_repo, "files"))
160+
cl_assert(reference_is_packed(looked_up_ref) == 0);
157161
cl_assert_equal_s(looked_up_ref->name, new_head);
158162

159163
/* ...and that it points to the current master tip */
@@ -332,8 +336,9 @@ static void count_fsyncs(size_t *create_count, size_t *compress_count)
332336
void test_refs_create__does_not_fsync_by_default(void)
333337
{
334338
size_t create_count, compress_count;
339+
if (!cl_repo_has_ref_format(g_repo, "files"))
340+
cl_skip();
335341
count_fsyncs(&create_count, &compress_count);
336-
337342
cl_assert_equal_i(0, create_count);
338343
cl_assert_equal_i(0, compress_count);
339344
}
@@ -342,6 +347,9 @@ void test_refs_create__fsyncs_when_global_opt_set(void)
342347
{
343348
size_t create_count, compress_count;
344349

350+
if (!cl_repo_has_ref_format(g_repo, "files"))
351+
cl_skip();
352+
345353
cl_git_pass(git_libgit2_opts(GIT_OPT_ENABLE_FSYNC_GITDIR, 1));
346354
count_fsyncs(&create_count, &compress_count);
347355

@@ -353,6 +361,9 @@ void test_refs_create__fsyncs_when_repo_config_set(void)
353361
{
354362
size_t create_count, compress_count;
355363

364+
if (!cl_repo_has_ref_format(g_repo, "files"))
365+
cl_skip();
366+
356367
cl_repo_set_bool(g_repo, "core.fsyncObjectFiles", true);
357368

358369
count_fsyncs(&create_count, &compress_count);

tests/libgit2/refs/delete.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ void test_refs_delete__packed_loose(void)
3333

3434
/* Ensure the loose reference exists on the file system */
3535
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), packed_test_head_name));
36-
cl_assert(git_fs_path_exists(temp_path.ptr));
36+
if (cl_repo_has_ref_format(g_repo, "files"))
37+
cl_assert(git_fs_path_exists(temp_path.ptr));
3738

3839
/* Lookup the reference */
3940
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, packed_test_head_name));
4041

4142
/* Ensure it's the loose version that has been found */
42-
cl_assert(reference_is_packed(looked_up_ref) == 0);
43+
if (cl_repo_has_ref_format(g_repo, "files"))
44+
cl_assert(reference_is_packed(looked_up_ref) == 0);
4345

4446
/* Now that the reference is deleted... */
4547
cl_git_pass(git_reference_delete(looked_up_ref));
@@ -49,7 +51,8 @@ void test_refs_delete__packed_loose(void)
4951
cl_git_fail(git_reference_lookup(&another_looked_up_ref, g_repo, packed_test_head_name));
5052

5153
/* Ensure the loose reference doesn't exist any longer on the file system */
52-
cl_assert(!git_fs_path_exists(temp_path.ptr));
54+
if (cl_repo_has_ref_format(g_repo, "files"))
55+
cl_assert(!git_fs_path_exists(temp_path.ptr));
5356

5457
git_reference_free(another_looked_up_ref);
5558
git_str_dispose(&temp_path);
@@ -73,7 +76,8 @@ void test_refs_delete__packed_only(void)
7376
cl_git_pass(git_reference_lookup(&ref, g_repo, new_ref));
7477

7578
/* Ensure it's a loose reference */
76-
cl_assert(reference_is_packed(ref) == 0);
79+
if (cl_repo_has_ref_format(g_repo, "files"))
80+
cl_assert(reference_is_packed(ref) == 0);
7781

7882
/* Pack all existing references */
7983
cl_git_pass(git_repository_refdb(&refdb, g_repo));
@@ -84,7 +88,8 @@ void test_refs_delete__packed_only(void)
8488
cl_git_pass(git_reference_lookup(&ref, g_repo, new_ref));
8589

8690
/* Ensure it's a packed reference */
87-
cl_assert(reference_is_packed(ref) == 1);
91+
if (cl_repo_has_ref_format(g_repo, "files"))
92+
cl_assert(reference_is_packed(ref) == 1);
8893

8994
/* This should pass */
9095
cl_git_pass(git_reference_delete(ref));

tests/libgit2/refs/iterator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ void test_refs_iterator__foreach_through_symlink(void)
161161
#ifdef GIT_WIN32
162162
cl_skip();
163163
#endif
164+
if (!cl_repo_has_ref_format(repo, "files"))
165+
cl_skip();
164166

165167
cl_git_pass(git_vector_init(&output, 32, &refcmp_cb));
166168

tests/libgit2/refs/list.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ void test_refs_list__do_not_retrieve_references_which_name_end_with_a_lock_exten
4545
{
4646
git_strarray ref_list;
4747

48+
if (!cl_repo_has_ref_format(g_repo, "files"))
49+
cl_skip();
50+
4851
/* Create a fake locked reference */
4952
cl_git_mkfile(
5053
"./testrepo/.git/refs/heads/hanwen.lock",

tests/libgit2/refs/pack.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ void test_refs_pack__empty(void)
3535
/* create a packfile for an empty folder */
3636
git_str temp_path = GIT_STR_INIT;
3737

38+
if (!cl_repo_has_ref_format(g_repo, "files"))
39+
cl_skip();
40+
3841
cl_git_pass(git_str_join_n(&temp_path, '/', 3, git_repository_path(g_repo), GIT_REFS_HEADS_DIR, "empty_dir"));
3942
cl_git_pass(git_futils_mkdir_r(temp_path.ptr, GIT_REFS_DIR_MODE));
4043
git_str_dispose(&temp_path);
@@ -48,6 +51,9 @@ void test_refs_pack__loose(void)
4851
git_reference *reference;
4952
git_str temp_path = GIT_STR_INIT;
5053

54+
if (!cl_repo_has_ref_format(g_repo, "files"))
55+
cl_skip();
56+
5157
/* Ensure a known loose ref can be looked up */
5258
cl_git_pass(git_reference_lookup(&reference, g_repo, loose_tag_ref_name));
5359
cl_assert(reference_is_packed(reference) == 0);

tests/libgit2/refs/reflog/reflog.c

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,19 @@ void test_refs_reflog_reflog__renaming_the_reference_moves_the_reflog(void)
107107
git_str_joinpath(&master_log_path, git_str_cstr(&master_log_path), "refs/heads/master");
108108
git_str_joinpath(&moved_log_path, git_str_cstr(&moved_log_path), "refs/moved");
109109

110-
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&master_log_path)));
111-
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&moved_log_path)));
110+
if (cl_repo_has_ref_format(g_repo, "files")) {
111+
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&master_log_path)));
112+
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&moved_log_path)));
113+
}
112114

113115
cl_git_pass(git_reference_lookup(&master, g_repo, "refs/heads/master"));
114116
cl_git_pass(git_reference_rename(&new_master, master, "refs/moved", 0, NULL));
115117
git_reference_free(master);
116118

117-
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&master_log_path)));
118-
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&moved_log_path)));
119+
if (cl_repo_has_ref_format(g_repo, "files")) {
120+
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&master_log_path)));
121+
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&moved_log_path)));
122+
}
119123

120124
git_reference_free(new_master);
121125
git_str_dispose(&moved_log_path);
@@ -130,13 +134,15 @@ void test_refs_reflog_reflog__deleting_the_reference_deletes_the_reflog(void)
130134
git_str_joinpath(&master_log_path, git_repository_path(g_repo), GIT_REFLOG_DIR);
131135
git_str_joinpath(&master_log_path, git_str_cstr(&master_log_path), "refs/heads/master");
132136

133-
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&master_log_path)));
137+
if (cl_repo_has_ref_format(g_repo, "files"))
138+
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&master_log_path)));
134139

135140
cl_git_pass(git_reference_lookup(&master, g_repo, "refs/heads/master"));
136141
cl_git_pass(git_reference_delete(master));
137142
git_reference_free(master);
138143

139-
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&master_log_path)));
144+
if (cl_repo_has_ref_format(g_repo, "files"))
145+
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&master_log_path)));
140146
git_str_dispose(&master_log_path);
141147
}
142148

@@ -153,7 +159,8 @@ void test_refs_reflog_reflog__removes_empty_reflog_dir(void)
153159
git_str_joinpath(&log_path, git_repository_path(g_repo), GIT_REFLOG_DIR);
154160
git_str_joinpath(&log_path, git_str_cstr(&log_path), "refs/heads/new-dir/new-head");
155161

156-
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&log_path)));
162+
if (cl_repo_has_ref_format(g_repo, "files"))
163+
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&log_path)));
157164

158165
cl_git_pass(git_reference_delete(ref));
159166
git_reference_free(ref);
@@ -180,10 +187,12 @@ void test_refs_reflog_reflog__fails_gracefully_on_nonempty_reflog_dir(void)
180187
git_str_joinpath(&log_path, git_repository_path(g_repo), GIT_REFLOG_DIR);
181188
git_str_joinpath(&log_path, git_str_cstr(&log_path), "refs/heads/new-dir/new-head");
182189

183-
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&log_path)));
190+
if (cl_repo_has_ref_format(g_repo, "files")) {
191+
cl_assert_equal_i(true, git_fs_path_isfile(git_str_cstr(&log_path)));
184192

185-
/* delete the ref manually, leave the reflog */
186-
cl_must_pass(p_unlink("testrepo.git/refs/heads/new-dir/new-head"));
193+
/* delete the ref manually, leave the reflog */
194+
cl_must_pass(p_unlink("testrepo.git/refs/heads/new-dir/new-head"));
195+
}
187196

188197
/* new ref creation should fail since new-dir contains reflogs still */
189198
git_oid_from_string(&id, current_master_tip, GIT_OID_SHA1);
@@ -212,7 +221,9 @@ void test_refs_reflog_reflog__reading_the_reflog_from_a_reference_with_no_log_re
212221
git_str subtrees_log_path = GIT_STR_INIT;
213222

214223
git_str_join_n(&subtrees_log_path, '/', 3, git_repository_path(g_repo), GIT_REFLOG_DIR, refname);
215-
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&subtrees_log_path)));
224+
225+
if (cl_repo_has_ref_format(g_repo, "files"))
226+
cl_assert_equal_i(false, git_fs_path_isfile(git_str_cstr(&subtrees_log_path)));
216227

217228
cl_git_pass(git_reflog_read(&reflog, g_repo, refname));
218229

@@ -234,6 +245,9 @@ void test_refs_reflog_reflog__reading_a_reflog_with_invalid_format_succeeds(void
234245
git_str logpath = GIT_STR_INIT, logcontents = GIT_STR_INIT;
235246
char *star;
236247

248+
if (!cl_repo_has_ref_format(g_repo, "files"))
249+
cl_skip();
250+
237251
/* Create a new branch. */
238252
cl_git_pass(git_oid_from_string(&id, current_master_tip, GIT_OID_SHA1));
239253
cl_git_pass(git_reference_create(&ref, g_repo, refname, &id, 1, refmessage));

tests/libgit2/refs/rename.c

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ void test_refs_rename__loose(void)
4747
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, loose_tag_ref_name));
4848

4949
/* ... which is indeed loose */
50-
cl_assert(reference_is_packed(looked_up_ref) == 0);
50+
if (cl_repo_has_ref_format(g_repo, "files"))
51+
cl_assert(reference_is_packed(looked_up_ref) == 0);
5152

5253
/* Now that the reference is renamed... */
5354
cl_git_pass(git_reference_rename(&new_ref, looked_up_ref, new_name, 0, NULL));
@@ -62,12 +63,16 @@ void test_refs_rename__loose(void)
6263
cl_assert_equal_s(new_ref->name, new_name);
6364

6465
/* .. the new ref is loose... */
65-
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
66-
cl_assert(reference_is_packed(new_ref) == 0);
66+
if (cl_repo_has_ref_format(g_repo, "files")) {
67+
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
68+
cl_assert(reference_is_packed(new_ref) == 0);
69+
}
6770

6871
/* ...and the ref can be found in the file system */
69-
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), new_name));
70-
cl_assert(git_fs_path_exists(temp_path.ptr));
72+
if (cl_repo_has_ref_format(g_repo, "files")) {
73+
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), new_name));
74+
cl_assert(git_fs_path_exists(temp_path.ptr));
75+
}
7176

7277
git_reference_free(new_ref);
7378
git_reference_free(another_looked_up_ref);
@@ -82,14 +87,17 @@ void test_refs_rename__packed(void)
8287
const char *brand_new_name = "refs/heads/brand_new_name";
8388

8489
/* Ensure the ref doesn't exist on the file system */
85-
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), packed_head_name));
86-
cl_assert(!git_fs_path_exists(temp_path.ptr));
90+
if (cl_repo_has_ref_format(g_repo, "files")) {
91+
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), packed_head_name));
92+
cl_assert(!git_fs_path_exists(temp_path.ptr));
93+
}
8794

8895
/* The reference can however be looked-up... */
8996
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, packed_head_name));
9097

9198
/* .. and it's packed */
92-
cl_assert(reference_is_packed(looked_up_ref) != 0);
99+
if (cl_repo_has_ref_format(g_repo, "files"))
100+
cl_assert(reference_is_packed(looked_up_ref) != 0);
93101

94102
/* Now that the reference is renamed... */
95103
cl_git_pass(git_reference_rename(&new_ref, looked_up_ref, brand_new_name, 0, NULL));
@@ -104,12 +112,16 @@ void test_refs_rename__packed(void)
104112
cl_assert_equal_s(another_looked_up_ref->name, brand_new_name);
105113

106114
/* .. the ref is no longer packed... */
107-
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
108-
cl_assert(reference_is_packed(new_ref) == 0);
115+
if (cl_repo_has_ref_format(g_repo, "files")) {
116+
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
117+
cl_assert(reference_is_packed(new_ref) == 0);
118+
}
109119

110120
/* ...and the ref now happily lives in the file system */
111-
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), brand_new_name));
112-
cl_assert(git_fs_path_exists(temp_path.ptr));
121+
if (cl_repo_has_ref_format(g_repo, "files")) {
122+
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), brand_new_name));
123+
cl_assert(git_fs_path_exists(temp_path.ptr));
124+
}
113125

114126
git_reference_free(new_ref);
115127
git_reference_free(another_looked_up_ref);
@@ -124,21 +136,25 @@ void test_refs_rename__packed_doesnt_pack_others(void)
124136
const char *brand_new_name = "refs/heads/brand_new_name";
125137

126138
/* Ensure the other reference exists on the file system */
127-
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), packed_test_head_name));
128-
cl_assert(git_fs_path_exists(temp_path.ptr));
139+
if (cl_repo_has_ref_format(g_repo, "files")) {
140+
cl_git_pass(git_str_joinpath(&temp_path, git_repository_path(g_repo), packed_test_head_name));
141+
cl_assert(git_fs_path_exists(temp_path.ptr));
142+
}
129143

130144
/* Lookup the other reference */
131145
cl_git_pass(git_reference_lookup(&another_looked_up_ref, g_repo, packed_test_head_name));
132146

133147
/* Ensure it's loose */
134-
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
148+
if (cl_repo_has_ref_format(g_repo, "files"))
149+
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
135150
git_reference_free(another_looked_up_ref);
136151

137152
/* Lookup the reference to rename */
138153
cl_git_pass(git_reference_lookup(&looked_up_ref, g_repo, packed_head_name));
139154

140155
/* Ensure it's packed */
141-
cl_assert(reference_is_packed(looked_up_ref) != 0);
156+
if (cl_repo_has_ref_format(g_repo, "files"))
157+
cl_assert(reference_is_packed(looked_up_ref) != 0);
142158

143159
/* Now that the reference is renamed... */
144160
cl_git_pass(git_reference_rename(&renamed_ref, looked_up_ref, brand_new_name, 0, NULL));
@@ -148,10 +164,12 @@ void test_refs_rename__packed_doesnt_pack_others(void)
148164
cl_git_pass(git_reference_lookup(&another_looked_up_ref, g_repo, packed_test_head_name));
149165

150166
/* Ensure it's loose */
151-
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
167+
if (cl_repo_has_ref_format(g_repo, "files"))
168+
cl_assert(reference_is_packed(another_looked_up_ref) == 0);
152169

153170
/* Ensure the other ref still exists on the file system */
154-
cl_assert(git_fs_path_exists(temp_path.ptr));
171+
if (cl_repo_has_ref_format(g_repo, "files"))
172+
cl_assert(git_fs_path_exists(temp_path.ptr));
155173

156174
git_reference_free(renamed_ref);
157175
git_reference_free(another_looked_up_ref);

tests/libgit2/revwalk/basic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ void test_revwalk_basic__glob_heads_with_invalid(void)
170170

171171
revwalk_basic_setup_walk("testrepo");
172172

173+
if (!cl_repo_has_ref_format(_repo, "files"))
174+
cl_skip();
175+
173176
cl_git_mkfile("testrepo/.git/refs/heads/garbage", "not-a-ref");
174177
cl_git_pass(git_revwalk_push_glob(_walk, "heads"));
175178

tests/libgit2/worktree/refs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ void test_worktree_refs__creating_refs_uses_commondir(void)
248248
cl_git_pass(git_branch_create(&branch, fixture.worktree, "testbranch", commit, 0));
249249
cl_git_pass(git_branch_lookup(&lookup, fixture.worktree, "testbranch", GIT_BRANCH_LOCAL));
250250
cl_assert(git_reference_cmp(branch, lookup) == 0);
251-
cl_assert(git_fs_path_exists(refpath.ptr));
251+
if (cl_repo_has_ref_format(fixture.worktree, "files"))
252+
cl_assert(git_fs_path_exists(refpath.ptr));
252253

253254
git_reference_free(lookup);
254255
git_reference_free(branch);

0 commit comments

Comments
 (0)