Thread (1 message) 1 message, 1 author, 2020-12-08

Re: Cloning empty repository uses locally configured default branch name

From: Junio C Hamano <hidden>
Date: 2020-12-08 21:01:35

Jonathan Tan [off-list ref] writes:
quoted
quoted
A small issue is that upload-pack protocol v0 doesn't even write the
blank ref line ("000...000 capabilities^{}") if HEAD points to an unborn
branch, but that can be fixed as in the patch below.
I think the codepaths we have today in process_capabilities() and
process_dummy_ref() (both in connect.c) would do the right thing
when it sees a blank ref line even when nothing gets transported,
but I smell that the rewrite of this state machine is fairly recent
(say in the past few years) and I do not offhand know if clients
before the rewrite of the state machine (say in v2.18.0) would be OK
with the change.  It should be easy to check, though.
Yes - I backported my patch to v2.17.0 and it works:
I wouldn't be surprised if other reimplementations of Git (like
jgit, libgit2 and Go or Python or whatever your favorite language)
barfs, though.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help