{"thread":{"id":"50272","subject":"protocol v2: More data transmitted between client and server since v2.20.0","startedAt":"2019-01-21T08:28:32Z","lastAt":"2019-01-21T08:56:53Z","messageCount":2,"participants":["Kaartic Sivaraam"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"367217","messageId":"d8ef0c1e5f48952c6190672bc26244a02b8e9bcd.camel@gmail.com","threadId":"50272","inReplyTo":null,"subject":"protocol v2: More data transmitted between client and server since v2.20.0","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2019-01-20T21:30:38Z","receivedAt":"2019-01-21T08:28:32Z","isPatch":false,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"Hi all,\n\nI recently came across a blog[1] about how protocol v2 speeds up the\ntransfer between the client and the server. It states that the amount\nof data transmitted between the client and the server is less when\nusing the protocol v2.\n\nTo demonstrate the difference between v0 and v2 two commands were\nmentioned in the blog. The results hold true for me when I test using\nGit v2.18.1. The commands given there worked as mentioned in the blog\nuntil Git v2.18.1. But when I run the same commands using Git v2.19.2\nor the one I built from source in the 'next' branch (at aa96b0ce6b).\nI'm not sure why this is the case. Some observations below:\n\nProtocol v0\n===========\n# Git version: 2.18.1\n$ GIT_TRACE_PACKET=1 git -c protocol.version=0 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_0_git_2.18.1_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n\n$ wc -l git_protocol_0_git_2.18.1_stderr.txt\n36848 git_protocol_0_git_2.18.1_stderr.txt\n\n\n# Git version: 2.19.0\n$ GIT_TRACE_PACKET=1 git -c protocol.version=0 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_0_git_2.19.0_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n\n$ wc -l git_protocol_0_git_2.19.0_stderr.txt \n36848 git_protocol_0_git_2.19.0_stderr.txt\n\n\n# Git version: 2.20.0\n$ GIT_TRACE_PACKET=1 git -c protocol.version=0 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_0_git_2.20.0_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n\n$ wc -l git_protocol_0_git_2.20.0_stderr.txt \n36848 git_protocol_0_git_2.20.0_stderr.txt\n\n\n# Git version: 2.20.1.495.gaa96b0ce6b\n$ GIT_TRACE_PACKET=1 git -c protocol.version=0 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_0_git_2.20.1-source_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n\n$ wc -l git_protocol_0_git_2.20.1-source_stderr.txt \n36848 git_protocol_0_git_2.20.1-source_stderr.txt \n\n\nProtocol v2\n===========\n# Git version: 2.18.1\n$ GIT_TRACE_PACKET=1 git -c protocol.version=2 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_2_git_2.18.1_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n\n$ wc -l git_protocol_2_git_2.18.1_stderr.txt\n22 git_protocol_2_git_2.18.1_stderr.txt\n\n\n# Git version: 2.19.0\n$ GIT_TRACE_PACKET=1 git -c protocol.version=2 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_2_git_2.19.0_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n\n$ wc -l\n22 git_protocol_2_git_2.19.0_stderr.txt\n\n\n# Git version: 2.20.0\n$ GIT_TRACE_PACKET=1 git -c protocol.version=2 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_2_git_2.20.0_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n04845fdeae75ba5de7c93992a5d55663edf647e0\trefs/remotes/remote_mirror_630f74462b3b08a952486da866d5e702/master\n04845fdeae75ba5de7c93992a5d55663edf647e0\trefs/remotes/remote_mirror_655ad545056a2ad17e7ebc5461a986e4/master\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/remotes/remote_mirror_d612bbe5bee4fbc624df371bc7caa759/master\n\n$ wc -l git_protocol_2_git_2.20.0_stderr.txt \n160971 git_protocol_2_git_2.20.0_stderr.txt\n\n\n# Git version: 2.20.1.495.gaa96b0ce6b\n$ GIT_TRACE_PACKET=1 git -c protocol.version=2 ls-remote git@gitlab.com:gitlab-org/gitlab-ce.git master 2>git_protocol_2_git_2.20.1-source_stderr.txt\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/heads/master\n04845fdeae75ba5de7c93992a5d55663edf647e0\trefs/remotes/remote_mirror_630f74462b3b08a952486da866d5e702/master\n04845fdeae75ba5de7c93992a5d55663edf647e0\trefs/remotes/remote_mirror_655ad545056a2ad17e7ebc5461a986e4/master\nd4d4ebadfb373518013382560b1f505eb6217f13\trefs/remotes/remote_mirror_d612bbe5bee4fbc624df371bc7caa759/master\n\n$ wc -l git_protocol_2_git_2.20.1-source_stderr.txt\n160971 git_protocol_2_git_2.20.1-source_stderr.txt\n\n\nAlso, note that there are more refs printed when using v2 which is\nspooky too. I thought of running a bisect to find the actual culprit\nbut wanted to know if this was *actually* an issue or not? Any\nthoughts?\n\n\nReferences\n==========\n[1]: \nhttps://about.gitlab.com/2018/12/10/git-protocol-v2-enabled-for-ssh-on-gitlab-dot-com/\n\n--\nSivaraam\n\n"},{"id":"367218","messageId":"eed52a8c6592c6893134e29905fb960b25cd7b10.camel@gmail.com","threadId":"50272","inReplyTo":"d8ef0c1e5f48952c6190672bc26244a02b8e9bcd.camel@gmail.com","subject":"Re: protocol v2: More data transmitted between client and server since v2.20.0","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2019-01-20T21:35:43Z","receivedAt":"2019-01-21T08:56:53Z","isPatch":false,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"Oops. Small correction in the message.\n\n\nOn Mon, 2019-01-21 at 03:00 +0530, Kaartic Sivaraam wrote:\n> .. The commands given there worked as mentioned in the blog\n> until Git v2.18.1. But when I run the same commands using Git v2.19.2\n\nThat's Git v2.20.0 not Git v2.19.2.\n\n\n> or the one I built from source in the 'next' branch (at aa96b0ce6b).\n> I'm not sure why this is the case. Some observations below:\n> \n\n\nThat's it. Sorry for the confusion :-(\n\n--\nSivaraam\n\n"}]}