Git development
 help / color / mirror / Atom feed
* git-svn help for authorsfile
From: Dongsheng Song @ 2007-10-18  6:26 UTC (permalink / raw)
  To: git

In general, all svn projects share the same authorsfile, e.g.

[svn]
authorsfile=/path/to/authorsfile

[svn-remote "project-a"]
   url = http://server.org/svn
   branches = branches/*/project-a:refs/remotes/project-a/branches/*
   tags = tags/*/project-a:refs/remotes/project-a/tags/*
   trunk = trunk/project-a:refs/remotes/project-a/trunk

[svn-remote "project-b"]
   url = http://server.org/svn
   branches = branches/*/project-b:refs/remotes/project-b/branches/*
   tags = tags/*/project-b:refs/remotes/project-b/tags/*
   trunk = trunk/project-b:refs/remotes/project-b/trunk

But if  project-a and project-b has same svn id, map to different
user/email, how do I do?

Can we move authorsfile from svn to svn-remote section ?

Thanks for some help,

---
Dongsheng

^ permalink raw reply

* Re: On Tabs and Spaces
From: David Kastrup @ 2007-10-18  6:25 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christer Weinigel, Tom Tobin, git
In-Reply-To: <alpine.LFD.0.999.0710171438551.26902@woody.linux-foundation.org>

Linus Torvalds <torvalds@linux-foundation.org> writes:

> Maybe it's a character flaw. I'll respect people who do something
> interesting, but re-implementing CVS (and badly, at that)

I seem to remember somebody who started out reimplementing Unix, and
badly, at that.  With the help of many other people, this thing
finally became portable to more than i386 and more than AT drives.
Took quite a long time.  The ancient floppy disk code still has the
renown of being one of the worst pieces of drivers all around.

If you find this silly, so do I.  That's the point.

> or talking about syntactic changes to other peoples projects is not
> going to fill me with respect.
>
> In short, I'll give respect when somebody is shown to be *worth*
> that respect. But respect really has to be earned, not just
> "assumed", otherwise it's pointless.

Cooperation is easier if one is of the opinion rather that disrespect
has to be earned: otherwise you alienate potential contributors before
they even had a chance to contribute.

This difference in approach is one of the things I can't help admiring
in Junio.  And I don't think it is to the detriment of git.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply

* Re: [PATCH] t5516: test update of local refs on push
From: Jeff King @ 2007-10-18  6:21 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git, Perry Wagle
In-Reply-To: <20071018061746.GA29531@coredump.intra.peff.net>

On Thu, Oct 18, 2007 at 02:17:46AM -0400, Jeff King wrote:

> The first test (updating local refs) should succeed, but the
> second one (not updating on error) currently fails.

Oops, this should of course be labeled as 1/2.

For the fix, I didn't need anything from 'next', after all, and 2/2 also
works fine there (it was almost literally a code move).

-Peff

^ permalink raw reply

* [PATCH 2/2] send-pack: don't update tracking refs on error
From: Jeff King @ 2007-10-18  6:19 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git, Perry Wagle
In-Reply-To: <20071018045358.GB14735@spearce.org>

Previously, we updated the tracking refs (which match refs we
are pushing) while generating the list of refs to send.
However, at that point we don't know whether the refs were
accepted.

Instead, we now wait until we get a response code from the
server. If an error was indicated, we don't update any local
tracking refs. Technically some refs could have been updated
on the remote, but since the local ref update is just an
optimization to avoid an extra fetch, we are better off
erring on the side of correctness.

The user-visible message is now generated much later in the
program, and has been tweaked to make more sense.

Signed-off-by: Jeff King <peff@peff.net>
---
 send-pack.c |   50 ++++++++++++++++++++++++++++++++++----------------
 1 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/send-pack.c b/send-pack.c
index f74e66a..25d5c25 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -177,6 +177,35 @@ static int receive_status(int in)
 	return ret;
 }
 
+static void update_tracking_ref(struct remote *remote, struct ref *ref)
+{
+	struct refspec rs;
+	int will_delete_ref;
+
+	rs.src = ref->name;
+	rs.dst = NULL;
+
+	if (!ref->peer_ref)
+		return;
+
+	will_delete_ref = is_null_sha1(ref->peer_ref->new_sha1);
+
+	if (!will_delete_ref &&
+			!hashcmp(ref->old_sha1, ref->peer_ref->new_sha1))
+		return;
+
+	if (!remote_find_tracking(remote, &rs)) {
+		fprintf(stderr, "updating local tracking ref '%s'\n", rs.dst);
+		if (is_null_sha1(ref->peer_ref->new_sha1)) {
+			if (delete_ref(rs.dst, NULL))
+				error("Failed to delete");
+		} else
+			update_ref("update by push", rs.dst,
+					ref->new_sha1, NULL, 0, 0);
+		free(rs.dst);
+	}
+}
+
 static int send_pack(int in, int out, struct remote *remote, int nr_refspec, char **refspec)
 {
 	struct ref *ref;
@@ -302,22 +331,6 @@ static int send_pack(int in, int out, struct remote *remote, int nr_refspec, cha
 			fprintf(stderr, "\n  from %s\n  to   %s\n",
 				old_hex, new_hex);
 		}
-		if (remote) {
-			struct refspec rs;
-			rs.src = ref->name;
-			rs.dst = NULL;
-			if (!remote_find_tracking(remote, &rs)) {
-				fprintf(stderr, " Also local %s\n", rs.dst);
-				if (will_delete_ref) {
-					if (delete_ref(rs.dst, NULL)) {
-						error("Failed to delete");
-					}
-				} else
-					update_ref("update by push", rs.dst,
-						ref->new_sha1, NULL, 0, 0);
-				free(rs.dst);
-			}
-		}
 	}
 
 	packet_flush(out);
@@ -330,6 +343,11 @@ static int send_pack(int in, int out, struct remote *remote, int nr_refspec, cha
 			ret = -4;
 	}
 
+	if (remote && ret == 0) {
+		for (ref = remote_refs; ref; ref = ref->next)
+			update_tracking_ref(remote, ref);
+	}
+
 	if (!new_refs && ret == 0)
 		fprintf(stderr, "Everything up-to-date\n");
 	return ret;
-- 
1.5.3.4.1162.gc3e8e-dirty

^ permalink raw reply related

* [PATCH] t5516: test update of local refs on push
From: Jeff King @ 2007-10-18  6:17 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git, Perry Wagle
In-Reply-To: <20071018045358.GB14735@spearce.org>

The first test (updating local refs) should succeed, but the
second one (not updating on error) currently fails.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t5516-fetch-push.sh |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index ca46aaf..dd329d7 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -244,4 +244,32 @@ test_expect_success 'push with colon-less refspec (4)' '
 
 '
 
+test_expect_success 'push updates local refs' '
+
+	rm -rf parent child &&
+	mkdir parent && cd parent && git init &&
+		echo one >foo && git add foo && git commit -m one &&
+	cd .. &&
+	git clone parent child && cd child &&
+		echo two >foo && git commit -a -m two &&
+		git push &&
+	test $(git rev-parse master) = $(git rev-parse remotes/origin/master)
+
+'
+
+test_expect_success 'push does not update local refs on failure' '
+
+	rm -rf parent child &&
+	mkdir parent && cd parent && git init &&
+		echo one >foo && git add foo && git commit -m one &&
+		echo exit 1 >.git/hooks/pre-receive &&
+		chmod +x .git/hooks/pre-receive &&
+	cd .. &&
+	git clone parent child && cd child &&
+		echo two >foo && git commit -a -m two || exit 1
+		git push && exit 1
+	test $(git rev-parse master) != $(git rev-parse remotes/origin/master)
+
+'
+
 test_done
-- 
1.5.3.4.1162.gc3e8e-dirty

^ permalink raw reply related

* Re: [PATCH 2/2] Quoting paths in tests
From: Johannes Sixt @ 2007-10-18  6:08 UTC (permalink / raw)
  To: Jonathan del Strother; +Cc: git
In-Reply-To: <6E65762D-FBC4-4A7C-97A9-20F6744E25DE@steelskies.com>

Jonathan del Strother schrieb:
> 
> On 17 Oct 2007, at 12:32, Johannes Sixt wrote:
> 
>> Jonathan del Strother schrieb:
>>> --- a/t/lib-git-svn.sh
>>> +++ b/t/lib-git-svn.sh
>>> @@ -25,7 +25,7 @@ perl -w -e "
>>> use SVN::Core;
>>> use SVN::Repos;
>>> \$SVN::Core::VERSION gt '1.1.0' or exit(42);
>>> -system(qw/svnadmin create --fs-type fsfs/, '$svnrepo') == 0 or 
>>> exit(41);
>>> +system(qw/svnadmin create --fs-type fsfs/, \"$svnrepo\") == 0 or 
>>> exit(41);
>>
>> Here you have to work harder: The reason is that this is part of a 
>> perl expression (as opposed to an eval'd string), which does not have 
>> access to $svnrepo of the shell by which it is invoked. The original 
>> version failed if there were single-quotes in $svnrepo, the new 
>> version fails if it contains double-quotes.

You can rewrite this expression as
     perl -w -e '$svnrepo = shift;
	...
	$SVN::Core::Version gt "1.1.0" ...
	system(qw/svnadmin create --fs-type fsfs/, $svnrepo) == 0 ...
	...
     ' >&3 2>&4 "$svnrepo"

i.e. you pass the repository name as an argument to the scriptlet.

>> May I recommend that you run the test suite in a directory named like 
>> this:
>>
>>     $ mkdir \"\ \$GIT_DIR\ \'
>>     $ ls
>>     " $GIT_DIR '
> 
> 
> Eww.  I'm struggling a bit with paths this perverse, actually.
> 
> For instance, git_editor in git-sh-setup expects the editor path to be 
> pre-quoted.  So in t3404, you need to produce escaped double quotes & 
> dollar signs, resulting in unpleasantness like this :
> 
> VISUAL="`pwd`/fake-editor.sh"
> VISUAL=${VISUAL//\"/\\\"}
> VISUAL=${VISUAL//$/\\\$}

This is a bashism - that's a big no-no.

> VISUAL=\"$VISUAL\"
> export VISUAL
> 
> 
> And I'm struggling to come up with neat ways of rewriting things like, 
> eg, this bit from t5500 -
> test_expect_success "clone shallow" "git-clone --depth 2 
> \"file://`pwd`/.\" shallow"
> - to handle paths like that properly.

These examples expand `pwd` too early. Can't you just put everything inside 
single-quotes? Although I'm not sure about VISUAL: Is it invoked with $PWD 
that is different from $PWD when VISUAL is defined? If so, then you can 
hardly delay `pwd`...

I know I'm a bit anal with my criticism. I reviewed your patch because I 
think fixing for paths with whitespace is worthwhile. However, I also think 
any fix should go the full way and not only shift the problems into a 
different corner. Maybe a word from $maintainer would be in order ;)

-- Hannes

^ permalink raw reply

* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Mike Galbraith @ 2007-10-18  6:05 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20071018055729.GI14735@spearce.org>

On Thu, 2007-10-18 at 01:57 -0400, Shawn O. Pearce wrote:
> 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

^ permalink raw reply

* Re: On Tabs and Spaces
From: Andreas Ericsson @ 2007-10-18  6:02 UTC (permalink / raw)
  To: Christer Weinigel; +Cc: Johannes Schindelin, Linus Torvalds, Tom Tobin, git
In-Reply-To: <20071018023103.5d27ee35@localhost.localdomain>

Christer Weinigel wrote:
> 
>   /Christer (pissing contensts are silly, so why the hell am I getting
>              involved in one?)

Because the right to an opinion is so fundamental to us that when someone
claims yours is stupid for reasons you (or me, or anyone) find unfair, we
stand up and say so. It's not a sign of being stupid. It's a sign of being
protective about a very basic democratic right, and oss people are usually
very protective about those. Freedom of everything comes easier to people
than "force christianity on the world, but keep your sources open!".

Linus is definitely not the most polite of people out there. Had he been
less than top-ranked in the meritocracy he would have been utterly and
totally annihilated on several mailing lists a really long time ago. At
the same time, he's entitled to his opinion the same way everyone is, and
he's entitled to express it any way he wants. When he's *really* off the
mark, people will tell him so. Or ignore him totally, like an embarrassing
grandfather who's just gotten too drunk at the christmas dinner and started
fondling his grandsons girlfriend. However, the same goes for everyone else,
and Linus *is* fond of telling people "so". If nothing else, it saves
time to head off dead ends right at the start.

Linus isn't sacrosankt, just enough of a corner-stone that people will keep
listening to him even if he's wildly offending.

tabs-vs-spaces is not, I feel, a discussion that has a great impact in
the world, so being "really off the mark" is not really possible there.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

^ permalink raw reply

* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Shawn O. Pearce @ 2007-10-18  5:57 UTC (permalink / raw)
  To: Mike Galbraith; +Cc: git
In-Reply-To: <1192686882.9097.2.camel@Homer.simpson.net>

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?  ;-)
 
> 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.

^ permalink raw reply

* Re: pulling Already up-to-date linux-2.6 repo takes ~8 minutes?
From: Mike Galbraith @ 2007-10-18  5:54 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git
In-Reply-To: <20071018054834.GH14735@spearce.org>

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...

> 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

^ 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

* 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: 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: 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: 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: 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: [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: [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] 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: 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] 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: [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 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: 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: 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


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox