8000 transport: do not filter tags based on ref dir in local · libgit2/libgit2@656e751 · GitHub
[go: up one dir, main page]

Skip to content

Commit 656e751

Browse files
committed
transport: do not filter tags based on ref dir in local
Let git_object_type() do the filtering instead. Fixes: #6275
1 parent 403a03b commit 656e751

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/libgit2/transports/local.c

-4
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ static int add_ref(transport_local *t, const char *name)
108108
return error;
109109
}
110110

111-
/* If it's not a tag, we don't need to try to peel it */
112-
if (git__prefixcmp(name, GIT_REFS_TAGS_DIR))
113-
return 0;
114-
115111
if ((error = git_object_lookup(&obj, t->repo, &head->oid, GIT_OBJECT_ANY)) < 0)
116112
return error;
117113

tests/libgit2/network/remote/local.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void test_network_remote_local__retrieve_advertised_references(void)
6161

6262
cl_git_pass(git_remote_ls(&refs, &refs_len, remote));
6363

64-
cl_assert_equal_i(refs_len, 30);
64+
cl_assert_equal_i(refs_len, 31);
6565
}
6666

6767
void test_network_remote_local__retrieve_advertised_before_connect(void)
@@ -85,7 +85,7 @@ void test_network_remote_local__retrieve_advertised_references_after_disconnect(
8585

8686
cl_git_pass(git_remote_ls(&refs, &refs_len, remote));
8787

88-
cl_assert_equal_i(refs_len, 30);
88+
cl_assert_equal_i(refs_len, 31);
8989
}
9090

9191
void test_network_remote_local__retrieve_advertised_references_from_spaced_repository(void)
@@ -100,7 +100,7 @@ void test_network_remote_local__retrieve_advertised_references_from_spaced_repos
100100

101101
cl_git_pass(git_remote_ls(&refs, &refs_len, remote));
102102

103-
cl_assert_equal_i(refs_len, 30);
103+
cl_assert_equal_i(refs_len, 31);
104104

105105
git_remote_free(remote); /* Disconnect from the "spaced repo" before the cleanup */
106106
remote = NULL;

0 commit comments

Comments
 (0)
0