From: Joey Hess <joey@kitenet.net>
To: git@vger.kernel.org
Subject: the 100 mb push
Date: Tue, 15 Dec 2009 14:23:38 -0500 [thread overview]
Message-ID: <20091215192338.GA16654@gnu.kitenet.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 3109 bytes --]
Is it normal for git push to sometimes transfer much more data
than seems necessary? Here is a case where that happens:
joey@gnu:~/src/p.t>git branch
* master
pristine-tar
testsuite
joey@gnu:~/src/p.t>git remote show origin
* remote origin
Fetch URL: ssh://joey@git.kitenet.net/srv/git/pristine-tar.test
Push URL: ssh://joey@git.kitenet.net/srv/git/pristine-tar.test
HEAD branch: master
Remote branches:
master tracked
pristine-tar tracked
testsuite tracked
Local branches configured for 'git pull':
master merges with remote master
pristine-tar merges with remote pristine-tar
testsuite merges with remote testsuite
Local refs configured for 'git push':
master pushes to master (fast forwardable)
pristine-tar pushes to pristine-tar (up to date)
testsuite pushes to testsuite (local out of date)
Here, master is a typical small project branch. It has a 1 line change
made locally.
Meanwhile, the testsuite branch is a 100+ mb monster, containing a lot
of big binaries. In it, a small change has been made in the origin
repo. In the local repo, a *lot* of *big* files have been deleted from
the same branch, about 20 mb of files were removed all told. But the diff
for this change should be quite small.
So, testsuite needs to be merged before it can be pushed, but git push
doesn't tell me that. Instead, it goes off and does this for 2+ hours:
joey@gnu:~/src/p.t>git push
Counting objects: 241, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (206/206), done.
Writing objects: 15% (36/237), 2.16 MiB | 15 KiB/s
^C
It seems to be uploading the entire repo over the wire, and this is a
typical asymmetric network connection, so that goes slow. (Took me a
while to realize it was not just auto-gcing the repo locally.)
Once I realized what was going on, it was easy to merge it as shown
below, and then the push transferred an appropriatly small amount of data.
So, my question is, assuming this is not a straight up bug in git, would
it make sense to avoid this gotcha in some way?
joey@gnu:~/src/p.t2>git checkout testsuite
Switched to branch 'testsuite'
Your branch is ahead of 'origin/testsuite' by 1 commit.
joey@gnu:~/src/p.t2>git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From ssh://git.kitenet.net/srv/git/pristine-tar.test
3c16948..fce7ec1 testsuite -> origin/testsuite
Merge made by recursive.
Makefile | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
joey@gnu:~/src/p.t2>git push
Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 889 bytes, done.
Total 8 (delta 5), reused 0 (delta 0)
To ssh://joey@git.kitenet.net/srv/git/pristine-tar.test
aab45a1..cc93945 master -> master
fce7ec1..d82f225 testsuite -> testsuite
git version 1.6.5.3
--
see shy jo
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next reply other threads:[~2009-12-15 19:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 19:23 Joey Hess [this message]
2009-12-15 19:42 ` the 100 mb push Shawn O. Pearce
2009-12-15 20:00 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091215192338.GA16654@gnu.kitenet.net \
--to=joey@kitenet.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox