pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
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 pullgit://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)
(cd linux-2.6; git pull -tgit://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
Quoted 7 lines · Mike Galbraith
git_pull_linusscriptlet:#!/bin/sh
(cd linux-2.6; git pullgit://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)
(cd linux-2.6; git pull -tgit://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git)root@Homer: time ./git_pull_linus
...
Quoted 1 line
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. :-)
...
Quoted 4 lines
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.
Signature · 1 line
Shawn.
Quoted 3 lines · Shawn O. Pearce
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)
Quoted 1 line
What version of git is this, exactly (
git version)?
git version 1.5.3.4.203.gcc61a
Quoted 8 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
Quoted 7 lines
Now you can update from Linus with just:
$ git pullProvided 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
Quoted 7 lines · Mike Galbraith
Quoted 7 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
Quoted 5 lines · Mike Galbraith
Quoted 3 lines · Mike Galbraith
Quoted 3 lines
I'd suggest making your life a little bit easier. Consider creating a remote that points to Linus:
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
$ 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/masterDang. 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
Quoted 9 lines · Mike Galbraith
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
Quoted 2 lines
root@Homer: time git pull
remote: Total 48507 (delta 38878), reused 44654 (delta 35166)
...
Well, you downloaded everything again. However...
Quoted 3 lines
3419 objects were added to complete this thin pack.
* refs/remotes/origin/master: fast forward to branch 'master' ofgit://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.
Quoted 3 lines
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.
Signature · 1 line
Shawn.
Quoted 4 lines · Shawn O. Pearce
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...
Quoted 5 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
Quoted 8 lines · Mike Galbraith
Quoted 4 lines · Shawn O. Pearce
Look to see if there's anything on your current master branch that you don't want/need anymore:
$ git log ..mastergit trees here are meant to be absolutely virgin, so...
Whaa? You found something that's better for manging the kernel sources then Git? ;-)
Quoted 1 line
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.
Signature · 1 line
Shawn.
Quoted 6 lines · Shawn O. Pearce
Quoted 5 lines · Mike Galbraith
Quoted 3 lines · Shawn O. Pearce
Look to see if there's anything on your current master branch that you don't want/need anymore:
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
$ git log ..mastergit 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