git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Is anyone working on a next-gen Git protocol?

From
Steffen Prohaska <prohaska@zib.de>
Date
Oct 10, 2012, 19:13 UTC
Message-ID
<035A66D9-FAF0-48EE-B161-7D0CAD92F2FB@zib.de>
In-Reply-To
<7vtxu5lyjr.fsf@alter.siamese.dyndns.org>
On Oct 8, 2012, at 6:27 PM, Junio C Hamano wrote:
> Once we go into "want/have" phase, I do not think there is a need
> for fundamental change in the protocol (by this, I am not counting a
> change to send "have"s sparsely and possibly backtracking to bisect
> history, etc. as "fundamental").

I've recently discovered that the current protocol can be amazingly inefficient when it comes to transferring binary objects. Assuming two repositories that are in sync. After a 'git checkout --orphan && git commit', a subsequent transfers sends all the blobs attached to the new commit, although the other side already has all the blobs.

This behavior is especially annoying when (mis)using git to store binary files. I was thinking for a while that it might be a reasonable idea to store binary files in a submodule and frequently cut the history in order to save space. The history would have little value anyway, since diff and merge don't make much sense with binary files.

Eventually, I abandoned the idea due to the current behavior of the protocol. I had expected that git would be smarter and behave more like rsync, for example, by skipping big blobs as soon as it recognizes that they are already available at both sides.

Maybe the new protocol could include an optimization for the described case. I don't know whether this would be a fundamental change.

    Steffen
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 12 in “Is anyone working on a next-gen Git protocol?”
  1. Ævar Arnfjörð BjarmasonOct 7, 2012
  2. Ilari LiusvaaraOct 7, 2012
  3. Jeff KingOct 7, 2012
  4. Junio C HamanoOct 7, 2012
  5. Junio C HamanoOct 22, 2012
  6. Andreas EricssonOct 8, 2012
  7. Junio C HamanoOct 8, 2012
  8. Steffen ProhaskaOct 10, 2012
  9. Junio C HamanoOct 10, 2012
  10. Philip OakleyOct 10, 2012
  11. Nguyen Thai Ngoc DuyOct 11, 2012
  12. Shawn PearceOct 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.