Introducing Git protocol version 2

Introducing Git protocol version 2

  • May 21, 2018
Table of Contents

Introducing Git protocol version 2

Today we announce Git protocol version 2, a major update of Git’s wire protocol (how clones, fetches and pushes are communicated between clients and servers). This update removes one of the most inefficient parts of the Git protocol and fixes an extensibility bottleneck, unblocking the path to more wire protocol improvements in the future. The main motivation for the new protocol was to enable server side filtering of references (branches and tags).

Prior to protocol v2, servers responded to all fetch commands with an initial reference advertisement, listing all references in the repository. This complete listing is sent even when a client only cares about updating a single branch, e.g.: git fetch origin master. For repositories that contain 100s of thousands of references (the Chromium repository has over 500k branches and tags) the server could end up sending 10s of megabytes of data that get ignored.

This typically dominates both time and bandwidth during a fetch, especially when you are updating a branch that’s only a few commits behind the remote, or even when you are only checking if you are up-to-date, resulting in a no-op fetch.

Source: googleblog.com

Share :
comments powered by Disqus

Related Posts

Sapienz: Intelligent automated software testing at scale

Sapienz: Intelligent automated software testing at scale

Shipping code updates to the Facebook app, which is used every day by hundreds of millions of people, requires extensive testing to ensure stability and performance. At Facebook’s scale, this process requires checking hundreds of important interactions across numerous types of devices and operating systems for both correctness and speed. Traditionally, this has largely been a manual test design process, during which engineers devote time and resources to designing test cases.

Read More
Things I’ve learned using serverless

Things I’ve learned using serverless

After the tour-de-force of Serverlessconf in October, I decided my entire company would be going serverless. I spent the first couple of months beating my head against the wall trying to migrate a Python Flask app to Lambda—these efforts helped me find a better way.

Read More