Re: [PATCH v2 2/6] upload-pack: send symbolic ref information as capability
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 18, 2013, 04:36 UTC
- Message-ID
- <xmqq8uyuwxtq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1379471489-26280-3-git-send-email-gitster@pobox.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> static void upload_pack(void)
> {
> + struct string_list symref = STRING_LIST_INIT_DUP;
> +
> + head_ref_namespaced(find_symref, &symref);
> +
> if (advertise_refs || !stateless_rpc) {
> reset_timeout();
> - head_ref_namespaced(send_ref, NULL);
> + head_ref_namespaced(send_ref, &symref);
> for_each_namespaced_ref(send_ref, NULL);This one was trying to be too clever; HEAD may be pointing at an unborn branch in which case head_ref_namespaced() will not emit the capability bit, so the second line also needs to be
for_each_namespaced_ref(send_ref, &symref);