I have been trying to optimize git push for a while and I noticed these extra delievery of packets that we might not need and can be avoided. Note - I am behind a gitolite layer at the remote end.
So when I do a
git push origin <ref for the commit>,
the remote side executes a
git receive-pack <path/to/submodule>.
After this in trace log for the packet shows packets containing information regarding all the commits the repository has (which may become very large over the course of time).
The trace looks something like -
18:47:03.556493 pkt-line.c:80 packet: push< <commit hash> refs/tags/commit/<commit-hash>
.
.
.
.
What I was expecting it to be was to send only two such packets -
- One for the submodule commit.
- One for the root commit.
Can someone-explain to me why this is happening and if there is a way to overpower this check of deltas between local and remote versions and send only these two packets ?