Skip to content

Commit a1287f7

Browse files
mhaggergitster
authored andcommitted
clone: do not add alternate references to extra_refs
Alternate references are directly (and now, correctly) handled by fetch-pack, so there is no need to inform fetch-pack about them via the extra_refs back channel. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f257659 commit a1287f7

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

builtin/clone.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,6 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
232232
{
233233
char *ref_git;
234234
struct strbuf alternate = STRBUF_INIT;
235-
struct remote *remote;
236-
struct transport *transport;
237-
const struct ref *extra;
238235

239236
/* Beware: real_path() and mkpath() return static buffer */
240237
ref_git = xstrdup(real_path(item->string));
@@ -249,14 +246,6 @@ static int add_one_reference(struct string_list_item *item, void *cb_data)
249246
strbuf_addf(&alternate, "%s/objects", ref_git);
250247
add_to_alternates_file(alternate.buf);
251248
strbuf_release(&alternate);
252-
253-
remote = remote_get(ref_git);
254-
transport = transport_get(remote, ref_git);
255-
for (extra = transport_get_remote_refs(transport); extra;
256-
extra = extra->next)
257-
add_extra_ref(extra->name, extra->old_sha1, 0);
258-
259-
transport_disconnect(transport);
260249
free(ref_git);
261250
return 0;
262251
}
@@ -500,7 +489,6 @@ static void update_remote_refs(const struct ref *refs,
500489
const char *msg)
501490
{
502491
if (refs) {
503-
clear_extra_refs();
504492
write_remote_refs(mapped_refs);
505493
if (option_single_branch)
506494
write_followtags(refs, msg);

0 commit comments

Comments
 (0)