Git development
 help / color / mirror / Atom feed
* [PATCH] Cleanup git-send-email.perl:extract_valid_email
From: Horst H. von Brand @ 2006-06-03 17:11 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Horst H. von Brand

- Fix the regular expressions for local addresses
- Fix the fallback regexp for non-local addresses, simplify the logic

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
---
 git-send-email.perl |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index ed1d89b..a7a7797 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -314,18 +314,15 @@ sub extract_valid_address {
 	my $address = shift;
 
 	# check for a local address:
-	return $address if ($address =~ /^([\w\-]+)$/);
+	return $address if ($address =~ /^([\w\-.]+)$/);
 
 	if ($have_email_valid) {
 		return Email::Valid->address($address);
 	} else {
 		# less robust/correct than the monster regexp in Email::Valid,
 		# but still does a 99% job, and one less dependency
-		my $cleaned_address;
-		if ($address =~ /([^\"<>\s]+@[^<>\s]+)/) {
-			$cleaned_address = $1;
-		}
-		return $cleaned_address;
+		$address =~ /([\w\-.]+@[\w\-.]+)/;
+		return $1;
 	}
 }
 
-- 
1.3.3.g86f7

^ permalink raw reply related

* Re: Gitk feature - show nearby tags
From: Junio C Hamano @ 2006-06-03 16:50 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git
In-Reply-To: <17537.32585.260926.48759@cargo.ozlabs.ibm.com>

Paul Mackerras <paulus@samba.org> writes:

> ...  I think that with heads, you
> would want to see all the descendent heads, rather than just the
> nearest ones (those that aren't descendents of another descendent
> head) as I do with tags.  What do you think?  If one head is a
> descendent of another, and both are descendents of the selected
> commit, should I show both?

That would be useful I think.

>> BTW, what's the maintenance/rewind policy on the "new" branch of
>> gitk.git?  If you are never going to rewind it, I could pull it
>> in "next" (and keep pulling your "master" in my "master") for
>> wider exposure if you like.
>
> I intend to pull "new" into "master" shortly, assuming I don't get any
> bug reports for the "new" branch. :)
>
> If you pull my "new" into your "next", and you then pull your "next"
> into your "master", and I pull my "new" into my "master", and you pull
> my "master" into your "master", won't we end up with duplicate merges?

Yes, but I rarely if ever pull "next" as a whole into "master".

^ permalink raw reply

* [PATCH] Builtin git-rev-parse.
From: Christian Couder @ 2006-06-03 16:45 UTC (permalink / raw)
  To: Junio Hamano; +Cc: git

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

---
 Makefile                           |    7 +++----
 rev-parse.c => builtin-rev-parse.c |    3 ++-
 builtin.h                          |    1 +
 git.c                              |    3 ++-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index b6fce39..004c216 100644
--- a/Makefile
+++ b/Makefile
@@ -154,8 +154,7 @@ PROGRAMS = \
 	git-hash-object$X git-index-pack$X git-local-fetch$X \
 	git-mailinfo$X git-merge-base$X \
 	git-merge-index$X git-mktag$X git-mktree$X git-pack-objects$X git-patch-id$X \
-	git-peek-remote$X git-prune-packed$X \
-	git-receive-pack$X git-rev-parse$X \
+	git-peek-remote$X git-prune-packed$X git-receive-pack$X \
 	git-send-pack$X git-shell$X \
 	git-show-index$X git-ssh-fetch$X \
 	git-ssh-upload$X git-unpack-file$X \
@@ -168,7 +167,7 @@ PROGRAMS = \
 BUILT_INS = git-log$X git-whatchanged$X git-show$X \
 	git-count-objects$X git-diff$X git-push$X \
 	git-grep$X git-add$X git-rm$X git-rev-list$X \
-	git-check-ref-format$X \
+	git-check-ref-format$X git-rev-parse$X \
 	git-init-db$X git-tar-tree$X git-upload-tar$X git-format-patch$X \
 	git-ls-files$X git-ls-tree$X \
 	git-read-tree$X git-commit-tree$X \
@@ -222,7 +221,7 @@ LIB_OBJS = \
 BUILTIN_OBJS = \
 	builtin-log.o builtin-help.o builtin-count.o builtin-diff.o builtin-push.o \
 	builtin-grep.o builtin-add.o builtin-rev-list.o builtin-check-ref-format.o \
-	builtin-rm.o builtin-init-db.o \
+	builtin-rm.o builtin-init-db.o builtin-rev-parse.o \
 	builtin-tar-tree.o builtin-upload-tar.o \
 	builtin-ls-files.o builtin-ls-tree.o \
 	builtin-read-tree.o builtin-commit-tree.o \
diff --git a/rev-parse.c b/builtin-rev-parse.c
similarity index 99%
rename from rev-parse.c
rename to builtin-rev-parse.c
index 4e2d9fb..c353a48 100644
--- a/rev-parse.c
+++ b/builtin-rev-parse.c
@@ -7,6 +7,7 @@ #include "cache.h"
 #include "commit.h"
 #include "refs.h"
 #include "quote.h"
+#include "builtin.h"
 
 #define DO_REVS		1
 #define DO_NOREV	2
@@ -163,7 +164,7 @@ static int show_file(const char *arg)
 	return 0;
 }
 
-int main(int argc, char **argv)
+int cmd_rev_parse(int argc, const char **argv, char **envp)
 {
 	int i, as_is = 0, verify = 0;
 	unsigned char sha1[20];
diff --git a/builtin.h b/builtin.h
index 738ec3d..ffa9340 100644
--- a/builtin.h
+++ b/builtin.h
@@ -43,5 +43,6 @@ extern int cmd_diff_index(int argc, cons
 extern int cmd_diff_stages(int argc, const char **argv, char **envp);
 extern int cmd_diff_tree(int argc, const char **argv, char **envp);
 extern int cmd_cat_file(int argc, const char **argv, char **envp);
+extern int cmd_rev_parse(int argc, const char **argv, char **envp);
 
 #endif
diff --git a/git.c b/git.c
index 10ea934..bc463c9 100644
--- a/git.c
+++ b/git.c
@@ -69,7 +69,8 @@ static void handle_internal_command(int 
 		{ "diff-index", cmd_diff_index },
 		{ "diff-stages", cmd_diff_stages },
 		{ "diff-tree", cmd_diff_tree },
-		{ "cat-file", cmd_cat_file }
+		{ "cat-file", cmd_cat_file },
+		{ "rev-parse", cmd_rev_parse }
 	};
 	int i;
 
-- 
1.3.3.ge13b

^ permalink raw reply related

* Re: Gitk feature - show nearby tags
From: Jonas Fonseca @ 2006-06-03 16:19 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git
In-Reply-To: <e5sa47$qv8$1@sea.gmane.org>

Jakub Narebski <jnareb@gmail.com> wrote Sat, Jun 03, 2006:
> Jonas Fonseca wrote:
> 
> > I already took your hint from the other day on irc and have begun on
> > implementing this revision graph visualization for tig. :)
> > 
> > The problem is of course to come up with some ascii-art which is both
> > readable and dense. Below is my mockup of something not using line
> > graphics,[...]
> 
> As I can see you use 'vertical' layout. Do I understand correctly that '*'
> refers to commit on marked (by column) branch, and '|' means pass-thru?

Yes, and 'M' marks merges. Putting information in the "commit node"
should make certain things more obvious. You could encode information
such as whether a commit is a "unique head" (nothing other revisions
references this commit). For example the first commit will always be
unique, but when using --all other heads might show up "unique".

	+ [master] ...
	* ...
	| + [unmerged/topic] ...
	| * ...
	*' ...

> BTW. you might want to take a look at http://revctrl.org/ diagrams;
> AFAICT all the git documentation uses 'horizontal' layout, which is good
> for example but perhaps not for long-lived development...

Looking at the examples on http://revctrl.org/StaircaseMerge: it might
be more readable but not as dense as I would like, namely one commit pr
line.

-- 
Jonas Fonseca

^ permalink raw reply

* Re: Gitk feature - show nearby tags
From: Jakub Narebski @ 2006-06-03 15:33 UTC (permalink / raw)
  To: git
In-Reply-To: <20060603151240.GA4024@diku.dk>

Jonas Fonseca wrote:

> I already took your hint from the other day on irc and have begun on
> implementing this revision graph visualization for tig. :)
> 
> The problem is of course to come up with some ascii-art which is both
> readable and dense. Below is my mockup of something not using line
> graphics,[...]

As I can see you use 'vertical' layout. Do I understand correctly that '*'
refers to commit on marked (by column) branch, and '|' means pass-thru?

BTW. you might want to take a look at http://revctrl.org/ diagrams;
AFAICT all the git documentation uses 'horizontal' layout, which is good
for example but perhaps not for long-lived development...

-- 
Jakub Narebski
Warsaw, Poland

^ permalink raw reply

* Re: Gitk feature - show nearby tags
From: Jonas Fonseca @ 2006-06-03 15:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Paul Mackerras, git
In-Reply-To: <7vslmm8rcd.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> wrote Sat, Jun 03, 2006:
> For a graphical interface like gitk it may not be such a big
> deal (you can always follow the line), but an interface like tig
> that shows commits in a linear fashion it would make a big
> difference in usability.

I already took your hint from the other day on irc and have begun on
implementing this revision graph visualization for tig. :)

The problem is of course to come up with some ascii-art which is both
readable and dense. Below is my mockup of something not using line
graphics, however using line graphics it might be possible to get
something more unambiguos but also more "edgy".

	* [release] Sync docs
	M Merge ...
	|`* [master] Fix spelling
	| * Implement ...
	M | Merge ...
	|`M Merge ...
	| |`* Topic B ...
	| | * Topic B ...
	| * | Topic A
	| * | Topic A
	| *' Update docs
	: :
	M | Merge ...
	|`M Merge ...
	| *`. Topic B ...
	| * | Topic B ...
	| | * Topic A
	| | * Topic A
	| *' Update docs
	: :
	M | Merge ...
	|`M Merge ...
	| *`. Topic B ...
	| * | Topic B ...
	| | * Topic A
	M  `.`. Merge
	|`* | | Update docs

-- 
Jonas Fonseca

^ permalink raw reply

* Re: git reset --hard not removing some files
From: Linus Torvalds @ 2006-06-03 15:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Martin Waitz
In-Reply-To: <7vy7we8w1h.fsf@assigned-by-dhcp.cox.net>



On Sat, 3 Jun 2006, Junio C Hamano wrote:
> 
> I think this patch fixes the regression.  Comments?

The approach looks fine, but with your changes, the "deleted" flag makes 
no sense any more and looks redundant. It's not actually used for anything 
except deciding if we need to re-write the active_cache[] thing, and you 
migth as well use either "last" or "unmerged" for that.

(yeah, "last" and "unmerged" becomes non-null one entry earlier than 
"deleted", but that's actually just confusing, I think, and now depends on 
the fact that we don't have to re-write the first entry).

The whole "*dst++ = ce" _could_ be unconditional, the only reason I made 
it conditional at all is to avoid dirtying the mmap when not necessary (ie 
it's a performance optimization, and it's not one where that off-by-one 
matters).

So I think you could make it clearer by dropping "deleted" entirely, and 
just making the store be conditional on "last".

			Linus

^ permalink raw reply

* Re: Gitk feature - show nearby tags
From: Paul Mackerras @ 2006-06-03 12:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Jonas Fonseca
In-Reply-To: <7vslmm8rcd.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano writes:

> Another thing that would equally be useful is to show which
> branch a particular commit is on, so for example I can pick one
> commit while doing "gitk next" to view the next branch and see
> which topic it belongs to, and "gitk this-topic" to see which
> commits on that topic, if any, are not yet in the "next" branch.

That wouldn't be hard to do, it's just a matter of finding which heads
are descendents of the selected commit.  I think that with heads, you
would want to see all the descendent heads, rather than just the
nearest ones (those that aren't descendents of another descendent
head) as I do with tags.  What do you think?  If one head is a
descendent of another, and both are descendents of the selected
commit, should I show both?

> BTW, what's the maintenance/rewind policy on the "new" branch of
> gitk.git?  If you are never going to rewind it, I could pull it
> in "next" (and keep pulling your "master" in my "master") for
> wider exposure if you like.

I intend to pull "new" into "master" shortly, assuming I don't get any
bug reports for the "new" branch. :)

If you pull my "new" into your "next", and you then pull your "next"
into your "master", and I pull my "new" into my "master", and you pull
my "master" into your "master", won't we end up with duplicate merges?

Paul.

^ permalink raw reply

* Re: Gitk feature - show nearby tags
From: Marco Costalba @ 2006-06-03 11:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Paul Mackerras, git, Jonas Fonseca
In-Reply-To: <7vslmm8rcd.fsf@assigned-by-dhcp.cox.net>

On 6/3/06, Junio C Hamano <junkio@cox.net> wrote:
> Paul Mackerras <paulus@samba.org> writes:
>
> > I just pushed out an update to the "new" branch of the gitk.git
> > repository, which adds a feature that I have often wished for: it will
> > now show the nearest preceding and following tags when you select a
> > commit.  This is very useful if you need to identify which release was
> > the first to incorporate a particular patch, or if you need to know
> > which release a patch might have been based on.
>
> Another thing that would equally be useful is to show which
> branch a particular commit is on, so for example I can pick one
> commit while doing "gitk next" to view the next branch and see
> which topic it belongs to, and "gitk this-topic" to see which
> commits on that topic, if any, are not yet in the "next" branch.
>

If I have understood correctly the patch runs a 'git rev-list --all
--topo-order --parents'
and then does a tree walking.

I am wandering if there exist any native git way to found the previous tag.

As example given a selected revision with id <sha> is it possible to
do something like this to fond the ancestor?

1) get the tag list with git-peek-remote or something similar if tags
are not already loaded

2) given the tagList vector with n elements run

    git-rev-list  --topo-order <sha> ^tagList[0]  ^tagList[1]   ....
  ^tagList[n-1]

3) take the last sha spit out by git-rev-list, be it <lastSha>.

4) Previous nearest tag is the parent of lastSha

I've missed something?

      Marco

^ permalink raw reply

* Re: Gitk feature - show nearby tags
From: Junio C Hamano @ 2006-06-03 10:29 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git, Jonas Fonseca
In-Reply-To: <17537.22675.678700.118093@cargo.ozlabs.ibm.com>

Paul Mackerras <paulus@samba.org> writes:

> I just pushed out an update to the "new" branch of the gitk.git
> repository, which adds a feature that I have often wished for: it will
> now show the nearest preceding and following tags when you select a
> commit.  This is very useful if you need to identify which release was
> the first to incorporate a particular patch, or if you need to know
> which release a patch might have been based on.

Another thing that would equally be useful is to show which
branch a particular commit is on, so for example I can pick one
commit while doing "gitk next" to view the next branch and see
which topic it belongs to, and "gitk this-topic" to see which
commits on that topic, if any, are not yet in the "next" branch.

For a graphical interface like gitk it may not be such a big
deal (you can always follow the line), but an interface like tig
that shows commits in a linear fashion it would make a big
difference in usability.

BTW, what's the maintenance/rewind policy on the "new" branch of
gitk.git?  If you are never going to rewind it, I could pull it
in "next" (and keep pulling your "master" in my "master") for
wider exposure if you like.

^ permalink raw reply

* Re: gitk on Windows: layout problem
From: Paul Mackerras @ 2006-06-03  9:43 UTC (permalink / raw)
  To: git; +Cc: git
In-Reply-To: <20060530185441.GA10985@nospam.com>

Rutger Nijlunsing writes:

> Is this a known problem? gitk-du-jour on Windows starts up with an
> unusable layout. Screenshot attached.

Is that using Tk with the cygwin X server, or the native Windows Tk
port?

Paul.

^ permalink raw reply

* Gitk feature - show nearby tags
From: Paul Mackerras @ 2006-06-03  9:38 UTC (permalink / raw)
  To: git

I just pushed out an update to the "new" branch of the gitk.git
repository, which adds a feature that I have often wished for: it will
now show the nearest preceding and following tags when you select a
commit.  This is very useful if you need to identify which release was
the first to incorporate a particular patch, or if you need to know
which release a patch might have been based on.

(Specifically, it shows the tags for all tagged descendents that are
not descendents of another tagged descendent of the selected commit,
and the tags for all tagged ancestors that are not ancestors of
another tagged ancestor of the selected commit.)

Since there is a one-off computation that gitk does to work this out,
which takes an appreciable time (about 1.5 seconds on my G5 on the
kernel repository), I have made gitk do the computation in the
background, and update the diff/file display window when it's done.
There is also a checkbox in the preferences window where you can turn
it off if you don't want gitk to do this computation.

Comments/suggestions welcome.

Paul.

^ permalink raw reply

* Re: A test failing with python 2.2 -- ok?
From: Johannes Schindelin @ 2006-06-03  9:13 UTC (permalink / raw)
  To: geoff; +Cc: git
In-Reply-To: <93c3eada0606022348l3c39f966u781327b14b0bc3d5@mail.gmail.com>

Hi,

On Sat, 3 Jun 2006, Geoff Russell wrote:

> I'm not sure how far back you are supporting, but I'm running a python 
> 2.2 machine and make test fails with a missing python module. Whatever 
> criss-cross merges are, I don't need them, but figured if you were 
> intending to support older environments, then you may be interested.

Python 2.2 is too old, even if you import some missing modules. But you 
can always set "NO_PYTHON=YesPlease" in config.mak.

Hth,
Dscho

^ permalink raw reply

* Re: git reset --hard not removing some files
From: Junio C Hamano @ 2006-06-03  8:48 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: git, Martin Waitz
In-Reply-To: <7vhd33d2q2.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano <junkio@cox.net> writes:

> I would agree in the reproduction recipe Martin gave there is no
> problem but feature, but at the same time I suspect the recent
> "reset --hard simplification" has introduced a true regression.
> ...
>         $ git ls-files -u
>         100644 b1b716105590454bfc4c0247f193a04088f39c7f 1	file1
>         100644 2e0996000b7e9019eabcad29391bf0f5c7702f0b 3	file1
>         $ ls
>         file0  file1  file2
>         $ git reset --hard
>         $ ls
>         file0  file1  file2
>
> We used to remove file1 from the working tree in this case.  One
> of the most important reason to use "git reset --hard" is to
> recover from a conflicted, failed merge.  

I think this patch fixes the regression.  Comments?

-- >8 --
read-tree --reset: update working tree file for conflicted paths.

The earlier "git reset --hard" simplification stopped removing
leftover working tree files from a failed automerge, when
switching back to the HEAD version that does not have the
paths.

This patch, instead of removing the unmerged paths from the
index, drops them down to stage#0 but marks them with mode=0
(the same "to be deleted" marker we internally use for paths
deleted by the merge).  one_way_merge() function and the
functions it calls already know what to do with them -- if the
tree we are reading has the path the working tree file is
overwritten, and if it doesn't the working tree file is
removed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

 builtin-read-tree.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 716f792..71edaf6 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -753,6 +753,8 @@ static int read_cache_unmerged(void)
 {
 	int i, deleted;
 	struct cache_entry **dst;
+	int unmerged = 0;
+	struct cache_entry *last = NULL;
 
 	read_cache();
 	dst = active_cache;
@@ -760,16 +762,22 @@ static int read_cache_unmerged(void)
 	for (i = 0; i < active_nr; i++) {
 		struct cache_entry *ce = active_cache[i];
 		if (ce_stage(ce)) {
-			deleted++;
+			unmerged++;
+			if (last && !strcmp(ce->name, last->name)) {
+				deleted++;
+				continue;
+			}
 			invalidate_ce_path(ce);
-			continue;
+			last = ce;
+			ce->ce_mode = 0;
+			ce->ce_flags &= ~htons(CE_STAGEMASK);
 		}
 		if (deleted)
 			*dst = ce;
 		dst++;
 	}
 	active_nr -= deleted;
-	return deleted;
+	return unmerged;
 }
 
 static void prime_cache_tree_rec(struct cache_tree *it, struct tree *tree)
@@ -850,7 +858,10 @@ int cmd_read_tree(int argc, const char *
 			continue;
 		}
 
-		/* This differs from "-m" in that we'll silently ignore unmerged entries */
+		/* This differs from "-m" in that we'll silently ignore
+		 * unmerged entries and overwrite working tree files that
+		 * correspond to them.
+		 */
 		if (!strcmp(arg, "--reset")) {
 			if (stage || merge)
 				usage(read_tree_usage);

^ permalink raw reply related

* Re: http-fetch troubles
From: Junio C Hamano @ 2006-06-03  7:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Becky Bruce, git, Nick Hengeveld
In-Reply-To: <Pine.LNX.4.64.0606021925350.5498@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> writes:

> On Fri, 2 Jun 2006, Junio C Hamano wrote:
>> 
>> ... and I take all the credit ;-).
>
> I always knew you'd work out as a maintainer.
>
> 		Linus

Thanks for the compliment.  I realize that is your way to take
the credit ;-).

^ permalink raw reply

* Re: A test failing with python 2.2 -- ok?
From: Sean @ 2006-06-03  7:12 UTC (permalink / raw)
  To: geoff; +Cc: geoffrey.russell, git
In-Reply-To: <93c3eada0606022348l3c39f966u781327b14b0bc3d5@mail.gmail.com>

On Sat, 3 Jun 2006 16:18:32 +0930
"Geoff Russell" <geoffrey.russell@gmail.com> wrote:

> I'm not sure how far back you are supporting, but I'm running a python
> 2.2 machine
> and make test fails with a missing python module. Whatever criss-cross merges
> are, I don't need them, but figured if you were intending to support older
> environments, then you may be interested.

Hi Geoff,

You need Python version 2.3 or newer; from the INSTALL file:

       - "python" 2.3 or more recent; if you have 2.3, you may need
          to build with "make WITH_OWN_SUBPROCESS_PY=YesPlease".

Sean

^ permalink raw reply

* A test failing with python 2.2 -- ok?
From: Geoff Russell @ 2006-06-03  6:48 UTC (permalink / raw)
  To: git

Hi,

I'm not sure how far back you are supporting, but I'm running a python
2.2 machine
and make test fails with a missing python module. Whatever criss-cross merges
are, I don't need them, but figured if you were intending to support older
environments, then you may be interested.

Cheers,
Geoff Russell

$ git --version

    git version 1.3.3.g61ef-dirty

$ make test

*** t6021-merge-criss-cross.sh ***
....

Traceback (most recent call last):
  File "/usr/local/LINUX/GIT/git/t/../git-merge-recursive", line 10, in ?
    from heapq import heappush, heappop
ImportError: No module named heapq
-------------------------------------------------------

^ permalink raw reply

* Re: Importing Mozilla CVS into git
From: Jon Smirl @ 2006-06-03  4:28 UTC (permalink / raw)
  Cc: git
In-Reply-To: <9e4733910606011755n29a149f2m1409c5a23888f1c5@mail.gmail.com>

On 6/1/06, Jon Smirl <jonsmirl@gmail.com> wrote:
> With the attached patch you can parse the entire Mozilla tree. The
> tree has over 100,000 files in it and about 300 branches.

I was a little low with these counts, more like 110,000 files and some
parts of the tree have 1,000 branches. Total tree size is 3GB.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply

* Re: http-fetch troubles
From: Linus Torvalds @ 2006-06-03  2:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Becky Bruce, git, Nick Hengeveld
In-Reply-To: <7virnj9gkf.fsf@assigned-by-dhcp.cox.net>



On Fri, 2 Jun 2006, Junio C Hamano wrote:
> 
> ... and I take all the credit ;-).

I always knew you'd work out as a maintainer.

		Linus

^ permalink raw reply

* Re: http-fetch troubles
From: Junio C Hamano @ 2006-06-03  1:24 UTC (permalink / raw)
  To: Becky Bruce; +Cc: git, Nick Hengeveld
In-Reply-To: <1C422237-D48C-4A30-9BDD-5C165222873D@freescale.com>

Becky Bruce <Becky.Bruce@freescale.com> writes:

> Woohoo!  The stuff you moved to master (which is what I was building
> from, not "next", as Nick pointed out) has fixed the git-http-fetch
> segfault problem I was seeing.
>
> Thanks!

Thanks Nick for fixing, and Becky for confirming.

... and I take all the credit ;-).

I haven't pushed it out yet, but I believe "next" is also good
to go.

^ permalink raw reply

* Re: http-fetch troubles
From: Becky Bruce @ 2006-06-03  1:13 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Nick Hengeveld
In-Reply-To: <7vac8vbgqg.fsf_-_@assigned-by-dhcp.cox.net>


Woohoo!  The stuff you moved to master (which is what I was building  
from, not "next", as Nick pointed out) has fixed the git-http-fetch  
segfault problem I was seeing.

Thanks!
-Becky

On Jun 2, 2006, at 12:38 PM, Junio C Hamano wrote:

> Junio C Hamano <junkio@cox.net> writes:
>
>> Nick Hengeveld <nickh@reactrix.com> writes:
>>
>>> - "git push" seems to pass --thin by default to http-push, which
>>>   subsequently barfs because that's not a valid http-push option.
>>>   Should it be?  Should it be silently ignored?  Should git-push not
>>>   default to --thin when pushing with HTTP transport?
>>
>> The way I understand http-push works is that it does not use
>> packed transfer, so I presume even if we give --thin as a hint
>> it cannot even take advantage of it.  Probably we should stop
>> passing --thin to http transport (git native one uses it as a
>> cue that it can generate baseless deltas in the resulting pack).
>>
>>> - when I clone, http-fetch outputs a whole bunch of
>>>   "error: Could not read ..." messages - is that expected?
>>
>> The clone over http seems to be severely broken in "next" right
>> now.  The one in "master" seems to be OK.  bisecting suggests
>> the breakage is coming from the tree parser rewrite.
>>
>> bisect points at 136f2e548a34f1f504b0f062f87ddf33e8d6e83b.
>
> I've pushed out Nick's http-fetch fixes in "master" to see if it
> fixes problems for people.  Right now the one in "next" branch
> seems to be having unrelated problems coming from another topic
> which I haven't started tracking down yet.
>
>

^ permalink raw reply

* Re: Importing Mozilla CVS into git
From: Jon Smirl @ 2006-06-03  0:09 UTC (permalink / raw)
  To: Keith Packard; +Cc: git
In-Reply-To: <1149220518.5521.43.camel@neko.keithp.com>

If I parsecvs this pair it fails:

/home/jonsmirl/mozilla/mozilla/dom/src/base/nsFocusController.h,v
/home/jonsmirl/mozilla/mozilla/dom/src/base/nsGlobalWindow.cpp,v

[jonsmirl@jonsmirl foo]$ ../parsecvs <sm2
defaulting to local storage area
Load:                nsGlobalWindow.cpp,v ....................*     2 of     2
Warning: branch point MOZILLA_1_0_BRANCH -> master matched by date
fatal: Not a valid object name (null)
git-read-tree '(null)' failed
[jonsmirl@jonsmirl foo]$

But parsecvs works on each of them individually.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply

* Re: http-fetch troubles
From: Linus Torvalds @ 2006-06-02 22:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Nick Hengeveld, git
In-Reply-To: <7vmzcv9pba.fsf@assigned-by-dhcp.cox.net>



On Fri, 2 Jun 2006, Junio C Hamano wrote:
>
> I think this fixes the http trouble with tree parser change in
> the "next" branch.

Ahh, my bad. That happened as a bug in my original understanding of that 
fetch.c thing.

Your fix looks obviously fine,

               Linus

^ permalink raw reply

* Re: http-fetch troubles
From: Junio C Hamano @ 2006-06-02 22:15 UTC (permalink / raw)
  To: Nick Hengeveld; +Cc: git, Linus Torvalds
In-Reply-To: <7vac8vbgqg.fsf_-_@assigned-by-dhcp.cox.net>

I think this fixes the http trouble with tree parser change in
the "next" branch.

-- >8 --
fetch.c: do not call process_tree() from process_tree().

This function reads a freshly fetched tree object, and schedules
the objects pointed by it for further fetching, so calling lookup-tree
and doing process_tree() recursively from there does not make
much sense.  We need to use process() on it to make sure we
fetch it first.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/fetch.c b/fetch.c
index ec2d8c3..107504b 100644
--- a/fetch.c
+++ b/fetch.c
@@ -46,13 +46,20 @@ static int process_tree(struct tree *tre
 	desc.buf = tree->buffer;
 	desc.size = tree->size;
 	while (tree_entry(&desc, &entry)) {
+		struct object *obj = NULL;
+
 		if (S_ISDIR(entry.mode)) {
 			struct tree *tree = lookup_tree(entry.sha1);
-			process_tree(tree);
-		} else {
+			if (tree)
+				obj = &tree->object;
+		}
+		else {
 			struct blob *blob = lookup_blob(entry.sha1);
-			process(&blob->object);
+			if (blob)
+				obj = &blob->object;
 		}
+		if (!obj || process(obj))
+			return -1;
 	}
 	free(tree->buffer);
 	tree->buffer = NULL;

^ permalink raw reply related

* Re: [PATCH] ciabot: fix post-update hook description
From: Petr Baudis @ 2006-06-02 21:50 UTC (permalink / raw)
  To: Jonas Fonseca; +Cc: git
In-Reply-To: <20060529000959.GA2061@diku.dk>

Thanks, all four patches applied. :)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
A person is just about as big as the things that make them angry.

^ 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