Re: Could Git be smarter about object reuse?
flat view
From: Sainan <hidden>
Date: 2025-09-22 10:49:19
The receiver sends a list of commits it has
This alone is not enough because if I'm amending a commit, it doesn't have the new commit(s), but it does have the previous commit(s), so the fact of blobs/trees being reusable is missed.
For this to work, the sender needs to be able to follow the commits from these references
I think the issue here is more fundamental than this, because even just taking commits from one branch to the other is causing all objects to be resent even if again only the commit objects are new, not any attached trees or blobs. Of course, it gets even more complicated when there's forks involved which are usually stored in the same repo by the server, but the client might not be entirely aware that different remotes are related. But that's a different issue that I could work around if that were all that were missing. -- Sainan