* pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Mike Galbraith @ 2007-10-18 3:41 UTC (permalink / raw)
To: git
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
^ permalink raw reply
* Re: On Tabs and Spaces
From: Linus Torvalds @ 2007-10-18 4:17 UTC (permalink / raw)
To: Jeff King; +Cc: david, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <alpine.LFD.0.999.0710172017020.26902@woody.linux-foundation.org>
On Wed, 17 Oct 2007, Linus Torvalds wrote:
>
> [..] and if you're a vi user, you can do a ':set tabstop=4'
btw, don't get me wrong. I think 8-char tabstops are much better, and
would much prefer to really teach people not to indent too deeply (because
six-deep indents really look ugly as hell with 8-char indents).
So setting tabstops to smaller values is not something I think is good
practice, but at least that way you can keep your dirty perversions to
yourself, and don't have to admit to the world that you molest dogs and
small children and use an inferior tab-stop.
The rest of the world might notice occsionally when you don't hide your
non-indentation tab-uses well enough, of course, but keep to block
comments and spaces for non-indentation, and you'll be reasonably safe.
However, if I see people actually having indentations six+ deep, I'll know
that (a) you're likely a small-tab-misusing-deviant and (b) a horrible
programmer. And then the tab-deviancy is the smaller problem.
(Yes, we do have some cases of six+ deep indentations in the kernel. I'm
happy to say that they are fairly rare, and yes, I'm personally convinced
that the 8-wide indent level is part of it. It really *does* end up
encouraging people to split things up and write nested cases as separate
functions etc, because it simply becomes so obvious when things are going
south..)
Linus
^ permalink raw reply
* Re: On Tabs and Spaces
From: Linus Torvalds @ 2007-10-18 4:22 UTC (permalink / raw)
To: Paul Wankadia; +Cc: git
In-Reply-To: <loom.20071018T032910-500@post.gmane.org>
On Thu, 18 Oct 2007, Paul Wankadia wrote:
>
> I hope and pray that you are parodied on "South Park" someday.
Isn't that what every person aspires to in the end?
Maybe I should start a kooky religion, then I'd be a shoo-in.
Linus
^ permalink raw reply
* Re: On Tabs and Spaces
From: Dmitry Torokhov @ 2007-10-18 4:31 UTC (permalink / raw)
To: Jari Aalto; +Cc: git
In-Reply-To: <ejftl3c2.fsf@blue.sea.net>
On Wednesday 17 October 2007, Jari Aalto wrote:
> - Any editor will display the text written in "all spaces"
> 100 % the same. Regradless of any viewer or editor used.
>
> But the same is not true with text that uses tabs (because you
> really can't know what options the editor is preset / user set /
> regarding the treatment of tabs).
>
> The score is 1 - 0 for "all spaces" in this contest.
>
How about this - I like tabs because when you removing it you
need to hit Backspace just once and don't have to strain your
eyes figuring out "Did I delete enough? Does it line up now?"
--
Dmitry
^ permalink raw reply
* Re: On Tabs and Spaces
From: Dmitry Potapov @ 2007-10-18 4:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jari Aalto, git
In-Reply-To: <alpine.LFD.0.999.0710161214530.6887@woody.linux-foundation.org>
On Tue, Oct 16, 2007 at 12:20:50PM -0700, Linus Torvalds wrote:
> The answer is *also* not "tabs are just for initial code
> indents",
Unfortunately, it leads to some problems. For example, you can type:
git blame alloc.c
2c1cbec1 (Linus Torvalds 2007-04-16 22:10:19 -0700 21) #define DEFINE_ALLOCATOR(name, type) \
855419f7 (Linus Torvalds 2006-06-19 10:44:15 -0700 22) static unsigned int name##_allocs; \
100c5f3b (Linus Torvalds 2007-04-16 22:11:43 -0700 23) void *alloc_##name##_node(void) \
855419f7 (Linus Torvalds 2006-06-19 10:44:15 -0700 24) { \
855419f7 (Linus Torvalds 2006-06-19 10:44:15 -0700 25) static int nr; \
and see that the end of line 23 does not look right. Because of that,
I prefer tabs for initial code indents and spaces in other places. Of
course, my preferences are irrelevant when it comes to someone else's
project, and I can easily use whatever style it takes to get things
done. It is just that "use tabs elsewhere and everything will be fine
as long as you have the standard tab setting" is not exactly correct.
The rest is people's preferences and habits...
Dmitry
^ permalink raw reply
* [PATCH] Add a message explaining that automatic GC is about to start
From: koreth @ 2007-10-18 4:41 UTC (permalink / raw)
To: Jeff King; +Cc: Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <20071018032307.GA7313@coredump.intra.peff.net>
---
On Wed, Oct 17, 2007 at 11:23:07PM -0400, Jeff King wrote:
> It would have been nicer if it said something like "Your repository
> looks crufty. Running git-gc --auto..." using whatever terms users would
> be comfortable with. Instead, it just started with "Counting objects"
> and a long wait.
And as an added bonus, we can tell people how to turn off automatic GC
and how to invoke it by hand.
builtin-gc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/builtin-gc.c b/builtin-gc.c
index 23ad2b6..b1159d6 100644
--- a/builtin-gc.c
+++ b/builtin-gc.c
@@ -211,6 +211,10 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
prune = 0;
if (!need_to_gc())
return 0;
+ fprintf(stderr, "Packing your repository for optimum "
+ "performance. If you would rather run\n"
+ "\"git gc\" by hand, run \"git config gc.auto 0\" "
+ "to disable automatic cleanup.\n");
}
if (pack_refs && run_command_v_opt(argv_pack_refs, RUN_GIT_CMD))
--
1.5.3.rc2.4.g726f9
^ permalink raw reply related
* Re: [PATCH] Add a message explaining that automatic GC is about to start
From: Steven Grimm @ 2007-10-18 4:44 UTC (permalink / raw)
To: Jeff King; +Cc: Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <20071018044143.GA24043@midwinter.com>
Sigh... Forgot to add:
Signed-off-by: Steven Grimm <koreth@midwinter.com>
^ permalink raw reply
* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Shawn O. Pearce @ 2007-10-18 4:50 UTC (permalink / raw)
To: Mike Galbraith; +Cc: git
In-Reply-To: <1192678865.20353.14.camel@Homer.simpson.net>
Mike Galbraith <efault@gmx.de> wrote:
> 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.
^ permalink raw reply
* Re: On Tabs and Spaces
From: Nicolas Pitre @ 2007-10-18 4:52 UTC (permalink / raw)
To: Jeff King; +Cc: Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <20071018024553.GA5186@coredump.intra.peff.net>
On Wed, 17 Oct 2007, Jeff King wrote:
> As an aside, that commit was enough to trigger a "git-gc --auto", which
> was my first experience with it. It's actually kind of annoying
> (especially since I was about to repack -a -d).
Well, you actually touched every files in the tree, and there are about
22K of them. this, plus the tree objects leading to them, your commit
certainly did create an unusual amount of loose objects. Repacking them
will inevitably take a wile.
Nicolas
^ permalink raw reply
* Re: bug: origin refs updated too soon locally
From: Shawn O. Pearce @ 2007-10-18 4:53 UTC (permalink / raw)
To: Perry Wagle; +Cc: git
In-Reply-To: <8CEF6150-4BE7-4B4D-B58C-12CE4671007E@cs.indiana.edu>
Perry Wagle <wagle@cs.indiana.edu> wrote:
> If I clone a remote repository, make a few commits, push them to the
> remote repository, and the update hook on the remote repository
> rejects them (exit 1), the local origin refs are still updated as if
> the push had gone through. The workaround is to do a pull to set the
> origin refs back.
Heh. Yes, that's a known bug. Someone should really fix it.
The problem is we are updating the local tracking ref before we
actually get confirmation from the remote side that the remote side
has accepted (or rejected) that update request.
This is probably easier to do after the db/fetch-pack topic is
merged as the improvements there might make this easier. But I
could be wrong. Be nice if someone proved me wrong by writing up
a patch for git-send-pack.
For the time being the best way to recover from this is to use
git-fetch rather than git-pull. Recall that git-pull is defined as
"fetch then merge". You really just need to refetch the tracking
branches again, so your tracking branches have the same value as
the remote side.
--
Shawn.
^ permalink raw reply
* Re: On Tabs and Spaces
From: Jeff King @ 2007-10-18 4:54 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <alpine.LFD.0.9999.0710180049450.19446@xanadu.home>
On Thu, Oct 18, 2007 at 12:52:59AM -0400, Nicolas Pitre wrote:
> Well, you actually touched every files in the tree, and there are about
> 22K of them. this, plus the tree objects leading to them, your commit
> certainly did create an unusual amount of loose objects. Repacking them
> will inevitably take a wile.
Yes, I know. I wasn't complaining so much about the speed, but rather
the behavior of "git-gc" running while I was in the middle of trying to
accomplish something else (I hadn't seen it before, because I generally
keep my repos fairly packed).
-Peff
^ permalink raw reply
* Re: On Tabs and Spaces
From: Jeff King @ 2007-10-18 4:55 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <20071018045453.GA10825@coredump.intra.peff.net>
On Thu, Oct 18, 2007 at 12:54:53AM -0400, Jeff King wrote:
> > Well, you actually touched every files in the tree, and there are about
> > 22K of them. this, plus the tree objects leading to them, your commit
> > certainly did create an unusual amount of loose objects. Repacking them
> > will inevitably take a wile.
>
> Yes, I know. I wasn't complaining so much about the speed, but rather
> the behavior of "git-gc" running while I was in the middle of trying to
> accomplish something else (I hadn't seen it before, because I generally
> keep my repos fairly packed).
But if you are trying to say that my case is pathological, then yes.
-Peff
^ permalink raw reply
* Re: [PATCH 1/6] more compact progress display
From: Shawn O. Pearce @ 2007-10-18 4:58 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Karl Hasselström, git
In-Reply-To: <alpine.LFD.0.9999.0710171653500.19446@xanadu.home>
Nicolas Pitre <nico@cam.org> wrote:
> On Wed, 17 Oct 2007, Karl Hasselström wrote:
> > On 2007-10-16 22:11:37 -0400, Shawn O. Pearce wrote:
> > > Nicolas Pitre <nico@cam.org> wrote:
> > >
> > > > Each progress can be on a single line instead of two.
> > >
> > > Nice. Of course that screws with git-gui and now I have to match two
> > > regexs and not one. But whatever.
> >
> > Maybe an env variable could cause the code to emit machine-friendly
> > progress information instead?
>
> That won't help with remotely generated progress unaware of local env
> variable, and the remote server might still be generating old format.
Agreed. I've already merged Nico's change into my next branch.
I'll update git-gui soon to understand both formats, and that's that.
--
Shawn.
^ permalink raw reply
* Re: [PATCH] Add a message explaining that automatic GC is about to start
From: Jeff King @ 2007-10-18 5:01 UTC (permalink / raw)
To: koreth; +Cc: Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin, git
In-Reply-To: <20071018044143.GA24043@midwinter.com>
On Wed, Oct 17, 2007 at 09:41:43PM -0700, koreth@midwinter.com wrote:
> And as an added bonus, we can tell people how to turn off automatic GC
> and how to invoke it by hand.
I like it, especially with the new progress patches.
-Peff
^ permalink raw reply
* Re: [PATCH] Use exit 1 instead of die when req_Root fails.
From: Shawn O. Pearce @ 2007-10-18 5:04 UTC (permalink / raw)
To: Brian Gernhardt; +Cc: Frank Lichtenheld, git
In-Reply-To: <98FA3712-B4E5-499A-B3E5-818FC33833DA@silverinsanity.com>
Brian Gernhardt <benji@silverinsanity.com> wrote:
> On Oct 17, 2007, at 3:06 PM, Frank Lichtenheld wrote:
>
> >I have this in my repo and will submit this with the other git-
> >cvsserver
> >changes. I was just waiting for either Junio to return or someone else
> >stepping up.
>
> Ah. I had missed that. I just dug up the patch when switching to
> Shawn's repo gave me those old testing errors. Had thought it had
> gotten lost in the shuffle.
It did. I have your resubmit that started this thread in my INQ and
will try to get to it today. But if Frank has a queue of stuff I've
missed I'd like a pointer to it so I can also try to start working
through it. I know I also have some other topics that Lars Hjemli
accumlated in his tree that I still need to cherry-pick over into
mine, but I don't see the one we are talking about in there.
--
Shawn.
^ permalink raw reply
* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Mike Galbraith @ 2007-10-18 5:09 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20071018045001.GA14735@spearce.org>
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
> 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
^ permalink raw reply
* Re: [PATCH] Add a message explaining that automatic GC is about to start
From: Shawn O. Pearce @ 2007-10-18 5:11 UTC (permalink / raw)
To: Jeff King
Cc: koreth, Linus Torvalds, Luke Lu, Christer Weinigel, Tom Tobin,
git
In-Reply-To: <20071018050158.GA11903@coredump.intra.peff.net>
Jeff King <peff@peff.net> wrote:
> On Wed, Oct 17, 2007 at 09:41:43PM -0700, koreth@midwinter.com wrote:
>
> > And as an added bonus, we can tell people how to turn off automatic GC
> > and how to invoke it by hand.
>
> I like it, especially with the new progress patches.
Me too. Its in my tree now. :-)
--
Shawn.
^ permalink raw reply
* Re: [PATCH] Bisect: fix a removed variable that is still used.
From: Shawn O. Pearce @ 2007-10-18 5:13 UTC (permalink / raw)
To: Christian Couder; +Cc: Junio Hamano, Johannes Schindelin, git
In-Reply-To: <20071018005256.280dfaab.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> wrote:
> This is fix for something I forgot in the patch named:
>
> [PATCH 6/7] Bisect: factorise "bisect_{bad,good,dunno}"
> into "bisect_state".
>
> I can send an updated version of the above patch if
> needed.
Thanks. Squashed into 6/7.
--
Shawn.
^ permalink raw reply
* Re: [PATCH 1/2 v3] mergetool: use path to mergetool in config var mergetool.<tool>.path
From: Shawn O. Pearce @ 2007-10-18 5:27 UTC (permalink / raw)
To: Steffen Prohaska; +Cc: git
In-Reply-To: <11926413723666-git-send-email-prohaska@zib.de>
Steffen Prohaska <prohaska@zib.de> wrote:
> This commit adds a mechanism to provide absolute paths to the
> external programs called by 'git mergetool'. ...
...
> @@ -297,17 +297,38 @@ do
> shift
> done
>
> +valid_tool() {
> + case "$1" in
> + kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff)
> + ;; # happy
> + *)
> + return 1
> + ;;
> + esac
> +}
...
> + test -n "$merge_tool" || valid_tool "$merge_tool" || {
Wouldn't an empty $merge_tool string be caught above in the
valid_tool function where it falls through and returns 1?
So isn't test -n here redundant?
--
Shawn.
^ permalink raw reply
* Re: bug: origin refs updated too soon locally
From: Jeff King @ 2007-10-18 5:28 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Perry Wagle, git
In-Reply-To: <20071018045358.GB14735@spearce.org>
On Thu, Oct 18, 2007 at 12:53:58AM -0400, Shawn O. Pearce wrote:
> This is probably easier to do after the db/fetch-pack topic is
> merged as the improvements there might make this easier. But I
> could be wrong. Be nice if someone proved me wrong by writing up
> a patch for git-send-pack.
It doesn't look too bad...patch series in a few minutes.
-Peff
^ permalink raw reply
* Re: backup or mirror a repository
From: Dmitry Potapov @ 2007-10-18 5:32 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Dan Farina, Junio C Hamano, git
In-Reply-To: <7vsl4zqp8l.fsf@gitster.siamese.dyndns.org>
On Thu, Sep 27, 2007 at 11:27:06PM -0700, Junio C Hamano wrote:
> The "git remote add --mirror" setup is about setting up the
> local repository _AS_ the backup of the remote. In other words,
> the contents come from the remote by fetching from it and safely
> kept away from disaster on the local side. And for that,
> "remote prune" is a perfect thing to do.
I have tried to do that but I am getting a warning:
$ git remote prune origin
Warning: unrecognized mapping in remotes.origin.fetch: +refs/*:refs/*
and no branch is removed.
I suspect that the change that introduced --mirror option for the 'add'
command did not adjust the prune procedure to handle the new situation
properly. Or is just me doing something wrong?
Anyway, because the official released git still does not have --mirror
and it could be difficult to convince the admin to use the bleading edge
version of Git for secure backup, I wrote a simple script instead, which
provides the same functionality but using the released version of Git.
Maybe, someone else finds it useful.
$ cat git-mirror
#!/bin/sh
usage() {
echo >&2 "Usage: $0 URL"
exit 1
}
set -e
test $# -eq 1 || usage
URL="$1"
# Initialize Git bare directory
git --bare init
# Initialize the mirror
git remote add origin "$URL"
git fetch
rmdir refs/heads
ln -s remotes/origin refs/heads
# Adding creating a script that will be run by cron
cat <<EOF > git-mirror-sync
cd "$PWD"
git fetch
git remote prune origin
EOF
chmod +x git-mirror-sync
# Adding git-mirror-sync to cron
echo "Please, add $PWD/git-mirror-sync to cron"
#########################################################
Dmitry
^ permalink raw reply
* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Mike Galbraith @ 2007-10-18 5:39 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <1192684150.7390.15.camel@Homer.simpson.net>
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.
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
^ permalink raw reply
* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Mike Galbraith @ 2007-10-18 5:42 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git
In-Reply-To: <1192685971.7390.21.camel@Homer.simpson.net>
On Thu, 2007-10-18 at 07:39 +0200, Mike Galbraith wrote:
> 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
^ permalink raw reply
* Re: On Tabs and Spaces
From: Mike Hommey @ 2007-10-18 5:42 UTC (permalink / raw)
To: Jari Aalto; +Cc: git
In-Reply-To: <k5pll7rb.fsf@blue.sea.net>
On Thu, Oct 18, 2007 at 01:02:32AM +0300, Jari Aalto wrote:
> * Wed 2007-10-17 Michael Witten <mfwitten@MIT.EDU>
> * Message-Id: E29971BA-7306-4570-8383-26D0C9C0B814@mit.edu
> > On 17 Oct 2007, at 3:17:08 AM, Luke Lu wrote:
> >
> >> But I still haven't seen any compelling arguments against the "all
> >> space" case
> >
> > Overhead!
> >
> > If you use 8 spaces instead of one tab,
> > that's using up 7x more space!
>
> Software is the right place to worry about optimization. We should trust
> SCM to make proper and efficient deltas. If not, algorithms need
> improvemnts.
>
> Any cross platform development or electronic exchange is guaranteed to
> be interpreted correctly when policy enforces "only spaces"
>
> As we have already seen in numerous times in this thread, using tabs
> will - eventually - be interpreted in some editor, in some display, in
> some encironment using some tools ... incorrectly or different than the
> author intended. Simply because editors are configurable and we cannot
> know what settings they may have when they load the file in.
>
> There is no such problem with spaces.
There is such problem with spaces. A lot of editors will just insert
tabs to indent a new line when the previous you were typing begins with
enough spaces, in which case you end up with spaces and tabs mixed all
the way. It ends up being worse than all tabs.
Mike
^ permalink raw reply
* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Shawn O. Pearce @ 2007-10-18 5:48 UTC (permalink / raw)
To: Mike Galbraith; +Cc: git
In-Reply-To: <1192685971.7390.21.camel@Homer.simpson.net>
Mike Galbraith <efault@gmx.de> wrote:
> 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.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox