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
  connect: know that zero-ID is not a ref

 connect.c               |  7 +++++++
 t/ |  4 ----
 t/    | 22 ++++++++++++++++++++++
 t/           |  4 ++++
 4 files changed, 33 insertions(+), 4 deletions(-)


Reply via email to