This issue was noticed when trying to clone an empty repository served by a
server that uses the JGit library.
Reference Discovery in Documentation/technical/pack-protocol.txt dictates that
servers should send a zero ID when there are no refs in the queried repository,
and implementations like JGit do, but the C client does not handle them
correctly (treating them as an actual ref and subsequently returning incorrect
responses or errors).
These patches fix those while maintaining backwards compatibility with existing
implementations that do not send the zero ID in such a case.
Jonathan Tan (2):
tests: move test_lazy_prereq JGIT to test-lib.sh
connect: know that zero-ID is not a ref
connect.c | 7 +++++++
t/t5310-pack-bitmaps.sh | 4 ----
t/t5512-ls-remote.sh | 22 ++++++++++++++++++++++
t/test-lib.sh | 4 ++++
4 files changed, 33 insertions(+), 4 deletions(-)