Skip to content

Commit bf1feb9

Browse files
jonathantanmygitster
authored andcommitted
Revert "fetch-pack: add a deref_without_lazy_fetch_extended()"
This reverts commit a6e65fb. This revert simplifies the next patch in this patch set. The commit message of that commit mentions that the new function "will be used for the bundle-uri client in a subsequent commit", but it seems that eventually it wasn't used. Signed-off-by: Jonathan Tan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 23d289d commit bf1feb9

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

fetch-pack.c

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,11 @@ static void for_each_cached_alternate(struct fetch_negotiator *negotiator,
122122
cb(negotiator, cache.items[i]);
123123
}
124124

125-
static struct commit *deref_without_lazy_fetch_extended(const struct object_id *oid,
126-
int mark_tags_complete,
127-
enum object_type *type,
128-
unsigned int oi_flags)
125+
static struct commit *deref_without_lazy_fetch(const struct object_id *oid,
126+
int mark_tags_complete)
129127
{
130-
struct object_info info = { .typep = type };
128+
enum object_type type;
129+
struct object_info info = { .typep = &type };
131130
struct commit *commit;
132131

133132
commit = lookup_commit_in_graph(the_repository, oid);
@@ -136,9 +135,9 @@ static struct commit *deref_without_lazy_fetch_extended(const struct object_id *
136135

137136
while (1) {
138137
if (oid_object_info_extended(the_repository, oid, &info,
139-
oi_flags))
138+
OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK))
140139
return NULL;
141-
if (*type == OBJ_TAG) {
140+
if (type == OBJ_TAG) {
142141
struct tag *tag = (struct tag *)
143142
parse_object(the_repository, oid);
144143

@@ -152,7 +151,7 @@ static struct commit *deref_without_lazy_fetch_extended(const struct object_id *
152151
}
153152
}
154153

155-
if (*type == OBJ_COMMIT) {
154+
if (type == OBJ_COMMIT) {
156155
struct commit *commit = lookup_commit(the_repository, oid);
157156
if (!commit || repo_parse_commit(the_repository, commit))
158157
return NULL;
@@ -162,16 +161,6 @@ static struct commit *deref_without_lazy_fetch_extended(const struct object_id *
162161
return NULL;
163162
}
164163

165-
166-
static struct commit *deref_without_lazy_fetch(const struct object_id *oid,
167-
int mark_tags_complete)
168-
{
169-
enum object_type type;
170-
unsigned flags = OBJECT_INFO_SKIP_FETCH_OBJECT | OBJECT_INFO_QUICK;
171-
return deref_without_lazy_fetch_extended(oid, mark_tags_complete,
172-
&type, flags);
173-
}
174-
175164
static int rev_list_insert_ref(struct fetch_negotiator *negotiator,
176165
const struct object_id *oid)
177166
{

0 commit comments

Comments
 (0)