1

The document for running Git wire protocol v2 states that in order to invoke git-upload-pack with protocol v2, one needs to run it with an environment variable GIT_PROTOCOL containing version=2. I do that by running in terminal:

GIT_PROTOCOL='version=2' bash -c 'git upload-pack .'

But I still get v1 protocol running. I see that from the response of v1 form:

00f2562e09028aef13e2e4fa9483bf32a26329de78e1 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed symref=HEAD:refs/heads/master agent=git/2.15.1
<truncated>

Could somebody help me to either find what I'm doing wrong or understand how to invoke git-upload-pack with wire protocol version 2?

1 Answers1

1

Git 2.15 doesn't support the v2 protocol. The code to handle this environment variable didn't exist until at least 2.16, and the full v2 protocol was not in until later. You'll need a newer version of Git; I recommend the one from Homebrew.

On my system, with 2.29, I get the following:

$ GIT_PROTOCOL='version=2' bash -c 'git upload-pack .' | head -n1
000eversion 2
bk2204
  • 64,793
  • 6
  • 84
  • 100