threads / discuss / 10351

pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

Subject: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

## tl;dr

9 messages between Oct 18, 2007 and Oct 18, 2007.

replies: 8people: 2as markdown or json

Mike Galbraith· Oct 18, 2007, 03:41 UTC · lore
Greetings git gods,

I'm wondering if I'm not doing something wrong, and thereby putting unneeded stress on kernel.org when I pull latest kernel tree.

git_pull_linus scriptlet:

#!/bin/sh (cd linux-2.6; git pull git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git) (cd linux-2.6; git pull -t git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)

root@Homer: time ./git_pull_linus
remote: Generating pack...
remote: Counting objects: 17746
remote: Done counting 55975 objects.
remote: Result has 48507 objects.
remote: Deltifying 48507 objects...
remote:  100% (48507/48507) done
Indexing 48507 objects...
remote: Total 48507 (delta 38878), reused 44654 (delta 35166)
 100% (48507/48507) done
Resolving 38878 deltas...
 100% (38878/38878) done
3419 objects were added to complete this thin pack.
Already up-to-date.
You are not currently on a branch; you must explicitly
specify which branch you wish to merge:
  git pull <remote> <branch>

real 7m57.429s user 0m13.517s sys 0m0.859s

8 minutes, truckloads of network traffic, and lord knows what all going on at the other end just doesn't seem right. /me == dummy?

	-Mike
Shawn O. Pearce· Oct 18, 2007, 04:50 UTC · re: Mike Galbraith · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

Mike Galbraith <efault@gmx.de> wrote:
Show 7 quoted lines
> git_pull_linus scriptlet:
> 
> #!/bin/sh
> (cd linux-2.6; git pull git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)
> (cd linux-2.6; git pull -t git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)
> 
> root@Homer: time ./git_pull_linus
...
> remote: Total 48507 (delta 38878), reused 44654 (delta 35166)

Well, Linus and crew are pretty busy beavers. Its shocking how fast they can make a dam^H^H^Hoperating system better. :-)

...
> Already up-to-date.
> You are not currently on a branch; you must explicitly
> specify which branch you wish to merge:
>   git pull <remote> <branch>

The problem here is you aren't on a branch, you are on a detached HEAD. So we must have setup the wrong thing in .git/FETCH_HEAD and we didn't actually merge.

What version of git is this, exactly (`git version`)?

I'd suggest making your life a little bit easier. Consider creating a remote that points to Linus:

  $ git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
  $ git checkout -b master   ; # or any other branch
  $ git config branch.master.remote linus
  $ git config branch.master.merge refs/heads/master
Now you can update from Linus with just:
  $ git pull

Provided you are on branch "master", or whatever other branches you setup those branch.*.remote and branch.*.merge configuration options for.

-- 
Shawn.
Mike Galbraith· Oct 18, 2007, 05:09 UTC · re: Shawn O. Pearce · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

On Thu, 2007-10-18 at 00:50 -0400, Shawn O. Pearce wrote:
> The problem here is you aren't on a branch, you are on a detached
> HEAD.  So we must have setup the wrong thing in .git/FETCH_HEAD
> and we didn't actually merge.

Aha. (I didn't setup anything that I can recall, followed a howto I found)

> What version of git is this, exactly (`git version`)?
git version 1.5.3.4.203.gcc61a
Show 15 quoted lines
> I'd suggest making your life a little bit easier.  Consider creating
> a remote that points to Linus:
> 
>   $ git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>   $ git checkout -b master   ; # or any other branch
>   $ git config branch.master.remote linus
>   $ git config branch.master.merge refs/heads/master
> 
> Now you can update from Linus with just:
> 
>   $ git pull
> 
> Provided you are on branch "master", or whatever other branches
> you setup those branch.*.remote and branch.*.merge configuration
> options for.
Thanks, I appreciate it, kernel.org likely does too.
	-Mike
Mike Galbraith· Oct 18, 2007, 05:39 UTC · re: Mike Galbraith · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

On Thu, 2007-10-18 at 07:09 +0200, Mike Galbraith wrote:
Show 7 quoted lines
> > I'd suggest making your life a little bit easier.  Consider creating
> > a remote that points to Linus:
> > 
> >   $ git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> >   $ git checkout -b master   ; # or any other branch
> >   $ git config branch.master.remote linus
> >   $ git config branch.master.merge refs/heads/master

Dang. git was happy with everything above except the checkout -b master, so I can't get off the dangling limb I'm on, and onto a solid branch.

root@Homer: git checkout -b master
git checkout: branch master already exists
root@Homer: git branch
* (no branch)
  master
root@Homer: time git pull
remote: Generating pack...
remote: Counting objects: 18672
remote: Done counting 55975 objects.
remote: Result has 48507 objects.
remote: Deltifying 48507 objects...
remote:  100% (48507/48507) done
Indexing 48507 objects...
remote: Total 48507 (delta 38878), reused 44654 (delta 35166)
 100% (48507/48507) done
Resolving 38878 deltas...
 100% (38878/38878) done
3419 objects were added to complete this thin pack.
* refs/remotes/origin/master: fast forward to branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
  old..new: 86a71db..d85714d
You are not currently on a branch; you must explicitly
specify which branch you wish to merge:
  git pull <remote> <branch>

real 8m12.676s user 0m29.621s sys 0m2.763s

Mike Galbraith· Oct 18, 2007, 05:42 UTC · re: Mike Galbraith · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

On Thu, 2007-10-18 at 07:39 +0200, Mike Galbraith wrote:
Show 13 quoted lines
> On Thu, 2007-10-18 at 07:09 +0200, Mike Galbraith wrote:
> 
> > > I'd suggest making your life a little bit easier.  Consider creating
> > > a remote that points to Linus:
> > > 
> > >   $ git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> > >   $ git checkout -b master   ; # or any other branch
> > >   $ git config branch.master.remote linus
> > >   $ git config branch.master.merge refs/heads/master
> 
> Dang.  git was happy with everything above except the checkout -b
> master, so I can't get off the dangling limb I'm on, and onto a solid
> branch.
Pff.  -f.
Thanks, ~4 second pull is MUCH better :)
	-Mike
Shawn O. Pearce· Oct 18, 2007, 05:48 UTC · re: Mike Galbraith · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

Mike Galbraith <efault@gmx.de> wrote:
Show 9 quoted lines
> Dang.  git was happy with everything above except the checkout -b
> master, so I can't get off the dangling limb I'm on, and onto a solid
> branch.
> 
> root@Homer: git checkout -b master
> git checkout: branch master already exists
> root@Homer: git branch
> * (no branch)
>   master

Look to see if there's anything on your current master branch that you don't want/need anymore:

	$ git log ..master

If that comes up empty (no output) or you mean to discard those changes then you can just force create the branch and check it out:

	$ git branch -f master
	$ git checkout master

On the other hand if you want to keep those changes then you should consider creating a different branch than master, or merging master first:

	$ git merge master
> root@Homer: time git pull
> remote: Total 48507 (delta 38878), reused 44654 (delta 35166)
...
Well, you downloaded everything again.  However...
> 3419 objects were added to complete this thin pack.
> * refs/remotes/origin/master: fast forward to branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
>   old..new: 86a71db..d85714d
This time we actually stored a remote tracking branch.

So although we didn't actually merge Linus' current version into your detached HEAD we did save it under a remote tracking branch (named "origin/master") so the next time you run git-pull we won't actually need to download that data again. We already have it, and know we have it.

Its just not in your current branch.
> You are not currently on a branch; you must explicitly
> specify which branch you wish to merge:
>   git pull <remote> <branch>

If you finish switching to a real branch with a configured remote and merge entry then this message should go away and you should be able to efficiently pull Linus' tree into your own.

-- 
Shawn.
Mike Galbraith· Oct 18, 2007, 05:54 UTC · re: Shawn O. Pearce · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

On Thu, 2007-10-18 at 01:48 -0400, Shawn O. Pearce wrote:
> Look to see if there's anything on your current master branch that
> you don't want/need anymore:
> 
> 	$ git log ..master
git trees here are meant to be absolutely virgin, so...
Show 5 quoted lines
> If that comes up empty (no output) or you mean to discard those
> changes then you can just force create the branch and check it out:
> 
> 	$ git branch -f master
> 	$ git checkout master
Thanks again, I'm off my dangling limb.
	-Mike
Shawn O. Pearce· Oct 18, 2007, 05:57 UTC · re: Mike Galbraith · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

Mike Galbraith <efault@gmx.de> wrote:
Show 8 quoted lines
> On Thu, 2007-10-18 at 01:48 -0400, Shawn O. Pearce wrote:
> 
> > Look to see if there's anything on your current master branch that
> > you don't want/need anymore:
> > 
> > 	$ git log ..master
> 
> git trees here are meant to be absolutely virgin, so...
Whaa?  You found something that's better for manging the kernel
sources then Git?  ;-)
 
> Thanks again, I'm off my dangling limb.

Good to hear. I hate being out on a limb and not having a rope to climb down with.

-- 
Shawn.
Mike Galbraith· Oct 18, 2007, 06:05 UTC · re: Shawn O. Pearce · lore

Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?

On Thu, 2007-10-18 at 01:57 -0400, Shawn O. Pearce wrote:
Show 12 quoted lines
> Mike Galbraith <efault@gmx.de> wrote:
> > On Thu, 2007-10-18 at 01:48 -0400, Shawn O. Pearce wrote:
> > 
> > > Look to see if there's anything on your current master branch that
> > > you don't want/need anymore:
> > > 
> > > 	$ git log ..master
> > 
> > git trees here are meant to be absolutely virgin, so...
> 
> Whaa?  You found something that's better for manging the kernel
> sources then Git?  ;-)

cp vi diff patch :) I'm crawling toward the 20th century though. The tiny bit of git functionality I do use is pretty darn spiffy.

	-Mike

← back to recent threads