git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git pull transfers useless files
@ 2012-09-24 17:51 Angelo Borsotti
  2012-09-24 18:59 ` Junio C Hamano
  2012-09-24 19:17 ` Jeff King
  0 siblings, 2 replies; 3+ messages in thread
From: Angelo Borsotti @ 2012-09-24 17:51 UTC (permalink / raw)
  To: git

Hello,

git pull transfers useless files when called with the --squash option
and merge=binary
attribute.
Consider the following example:

#!/bin/bash

set -v
cd remote
rm -rf * .git/
git init
echo '*.pdf -crlf -diff merge=binary' >.git/info/attributes

touch f1
git add f1
echo "aaa" >f1.pdf
git add f1.pdf
cp <very large pdf file, some 100 Mbytes>.pdf f2.pdf
git add f2.pdf
git commit -m A
cd ..

cd local
rm -rf * .git/
git init
echo '*.pdf -crlf -diff merge=binary' >.git/info/attributes
git remote add remote ../remote

touch f3
git add f3
git commit -m B
git checkout -b develop

echo "bbb" >f2.pdf
git add f2.pdf
git commit -m C
git pull -v --squash remote master

ls
cat <f2.pdf

set +v

Replace <very large pdf file, some 100 Mbytes>.pdf with the path of a pdf file
that is really large and run it.
When it executes the git pull it spends on my computer some 30 seconds,
obviously transferring the pdf file, that then it disregards because of the
merge=binary attribute.
When a commit contains many binary files, the command spends a lot of
time needlessly.

Is it possible to optimize it?

Thank you
-Angelo Borsotti

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-24 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-24 17:51 git pull transfers useless files Angelo Borsotti
2012-09-24 18:59 ` Junio C Hamano
2012-09-24 19:17 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).