Git development
 help / color / mirror / Atom feed
* bundles with multiple branches
From: Jeffrey Ratcliffe @ 2009-08-23 20:36 UTC (permalink / raw)
  To: git

I tend to work on multiple machines that don't have direct access to
each and therefore keep my git repositories in sync using bundles.

This works fine for single branches - but how can I set things up so
that I can just

$ git pull <bundle>

or

$ git fetch <bundle>

and have git update all branches?

Regards

Jeff

^ permalink raw reply

* [PATCH] import-tars: Allow per-tar author and commit message.
From: Peter Krefting @ 2009-08-23 20:34 UTC (permalink / raw)
  To: git

Instead of having each imported tar ball's commit message be "Imported
from filename.tar", optionally take a commit message from a file
called "filename.tar.msg".

Instead of having each commit have the same author and committer
information, optionally read the committer information from a file
called "filename.tar.committer" and author from a file called
"filename.tar.author".

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
---
I used this (albeit based on a slightly earlier verison of the script)
to generate a better-looking history when importing
http://git.debian.org/?p=crashmail/jamnntpd.git and
http://git.debian.org/?p=crashmail/crashmail.git into Git, using
excerpts from the embedded change history as commit messages.

 contrib/fast-import/import-tars.perl |   42 +++++++++++++++++++++++++++++++--
 1 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index 78e40d2..7aad16f 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -109,12 +109,48 @@ foreach my $tar_file (@ARGV)
 		$have_top_dir = 0 if $top_dir ne $1;
 	}
 
+	# Optionally read a commit message from <filename.tar>.msg
+	my $commit_msg = "Imported from $tar_file.";
+	if (open MSG, '<', "${tar_file}.msg")
+	{
+		$commit_msg = '';
+		while (<MSG>)
+		{
+			$commit_msg .= $_;
+		}
+		close MSG;
+	}
+
+	# Optionally read a committer from <filename.tar>.committer
+	# (first line is name, second line is e-mail address).
+	my $this_committer_name = $committer_name;
+	my $this_committer_email = $committer_email;
+	if (open COMMITTER, '<', "${tar_file}.committer")
+	{
+		($this_committer_name, $this_committer_email) = <COMMITTER>;
+		chomp $this_committer_name;
+		chomp $this_committer_email;
+		close COMMITTER;
+	}
+
+	# Optionally read an author from <filename.tar>.author
+	# (first line is name, second line is e-mail address).
+	my $this_author_name = $author_name;
+	my $this_author_email = $author_email;
+	if (open AUTHOR, '<', "${tar_file}.author")
+	{
+		($this_author_name, $this_author_email) = <AUTHOR>;
+		chomp $this_author_name;
+		chomp $this_author_email;
+		close AUTHOR;
+	}
+
 	print FI <<EOF;
 commit $branch_ref
-author $author_name <$author_email> $author_time +0000
-committer $committer_name <$committer_email> $commit_time +0000
+author $this_author_name <$this_author_email> $author_time +0000
+committer $this_committer_name <$this_committer_email> $commit_time +0000
 data <<END_OF_COMMIT_MESSAGE
-Imported from $tar_file.
+$commit_msg
 END_OF_COMMIT_MESSAGE
 
 deleteall
-- 
1.6.3.3

^ permalink raw reply related

* Re: [PATCH] gitweb: pull ref markes pull out of subject <a> tag
From: Giuseppe Bilotta @ 2009-08-23 20:43 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Junio C Hamano
In-Reply-To: <200908232213.48786.jnareb@gmail.com>

2009/8/23 Jakub Narebski <jnareb@gmail.com>:
> For format_subject_html which you are fixing, and which is used by
> 'shortlog', 'history' and 'tags' views this didn't cause much changes
> in layout.  But the way gitweb uses git_print_header_div in views such
> as 'tree', 'blob' etc., where the outer (containing) link is made into
> *block* element[1] by the way of CSS (display: block) makes layout
> (visualisation) very screwed up in older browser.  But I don't expect
> you to fix that.
>
> [1] Originally so the area to click is larger.

Fixing that really needs some kind of ridiculously complex
workarounds, or a totally different layout. That is actually one of
the situations where nested links make perfect sense, and it's a real
pity the standard wouldn't allow them, and that some client actually
altered the DOM to 'fix' it. But anyway.

> Signoff?

Aaaargh. Is it enough if I put it here:

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>

or should I resend?

(One would expect I actually learned to add it, finally, but noooo ...
gah, stupid me.)

>> The next step would be to find a way to layout decently the case when
>> some shortlog entries have a _humongous_ amount of ref markers. See
>> for example http://git.oblomov.eu/acecad/shortlog
>>
>> I honestly doubt these cases happen in normal git repositories, but it
>> might still be worth taking them into consideration. Possibilities
>> include hard-limiting the title column maximum width (in browsers for
>> which the corresponding attributes and rules work), manual insertion of
>> hard line breaks <br/> every n-th ref marker, or something more dynamic
>> such as hiding most of the ref markers when they are more than, say, 5,
>> and showing them on hover.
>>
>> Suggestions? Comments?
>
> Perhaps limiting to heads and tags if there are too many refs?

That wouldn't help at all in the case I linked:
http://git.oblomov.eu/acecad/shortlog due to the number of tags that
were imported from CVS.

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply

* Re: bundles with multiple branches
From: Adam Brewster @ 2009-08-23 20:52 UTC (permalink / raw)
  To: Jeffrey Ratcliffe; +Cc: git
In-Reply-To: <30e395780908231336p403c2171ie383a81c3d1bb020@mail.gmail.com>

On Sun, Aug 23, 2009 at 4:36 PM, Jeffrey
Ratcliffe<jeffrey.ratcliffe@gmail.com> wrote:
> I tend to work on multiple machines that don't have direct access to
> each and therefore keep my git repositories in sync using bundles.
>
> This works fine for single branches - but how can I set things up so
> that I can just
>
> $ git pull <bundle>
>
> or
>
> $ git fetch <bundle>
>
> and have git update all branches?
>

1. Make sure you've got all of the refs you want in the bundle.  I
usually use `git bundle create ... --all`

2. Set up a remote on the destination side with a url of wherever you
keep bundles (like /media/cdrom) and a fetch line like
refs/heads/*:refs/remotes/source/*

git remote add bundle /media/cdrom
git config --replace-all remotes.bundle.fetch refs/heads/*:refs/remotes/bundle/*

Since your destination machine is likely not connected to the
internet, you may also want copy all of the remotes too.  I do that
with

git config --add remotes.bundle.fetch refs/remotes/*:refs/remotes/*

Beware of the use of the name "origin" with setups like this.  If you
have branches under refs/remotes/origin/ on the machine you use to
create the bundle, you will should make sure you don't try to copy
refs from refs/heads and refs/remotes/origin to the same place
(because refs/remotes/origin is the natural place to store both).

Adam

^ permalink raw reply

* Re: bundles with multiple branches
From: Jeffrey Ratcliffe @ 2009-08-23 21:04 UTC (permalink / raw)
  To: Adam Brewster; +Cc: git
In-Reply-To: <c376da900908231352o5c5746c0h9e39b80adede66e8@mail.gmail.com>

Thanks for the help

2009/8/23 Adam Brewster <adambrewster@gmail.com>:
> git remote add bundle /media/cdrom
> git config --replace-all remotes.bundle.fetch refs/heads/*:refs/remotes/bundle/*
> git config --add remotes.bundle.fetch refs/remotes/*:refs/remotes/*

On

$ git pull bundle

or

$ git fetch bundle

I get

fatal: '/media/cdrom': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly

Any ideas?

(I used the mount point of the USB stick where the bundles were but
the principle is the same)

Regards

Jeff

^ permalink raw reply

* Re: [PATCH-v2/RFC 3/6] xutils: fix ignore-all-space on incomplete line
From: Nanako Shiraishi @ 2009-08-23 21:07 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Thell Fowler, git, Johannes.Schindelin
In-Reply-To: <7v1vn2yklo.fsf@alter.siamese.dyndns.org>

Quoting Junio C Hamano <gitster@pobox.com>

> Having said that, I could use something like this.
>
> -- >8 -- cut here -- >8 -- 
> Subject: [PATCH] Teach mailinfo to ignore everything before -- >8 -- mark
>
> This teaches mailinfo the scissors -- >8 -- mark; the command ignores
> everything before it in the message body.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

There are left handed people whose scissors run in the wrong direction.

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index b0906ef..38c01e4 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -725,7 +725,8 @@ static int scissors(const struct strbuf *line)
 			scissors_dashes_seen |= 02;
 			continue;
 		}
-		if (i + 1 < len && !memcmp(buf + i, ">8", 2)) {
+		if (i + 1 < len &&
+		    !memcmp(buf + i, ">8", 2) || !memcmp(buf + i, "8<", 2)) {
 			scissors_dashes_seen |= 01;
 			i++;
 			continue;

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

^ permalink raw reply related

* Re: Pulling one commit at a time.
From: Nanako Shiraishi @ 2009-08-23 21:07 UTC (permalink / raw)
  To: Sanjiv Gupta; +Cc: git
In-Reply-To: <4A9172D0.6030507@microchip.com>

Quoting Sanjiv Gupta <sanjiv.gupta@microchip.com>

> I just wanted to know how can I pull one commit at a time from public
> repository.
> e.g.
> when I first cloned from the public repo, it was at X. now it has
> reached Y. I just want to pull x+1.

When your histories look like this:

      A                 your 'master'
     /
 ---X---U---V---W---Y   public 'master' (your 'origin')

instead of creating a single merge like this with "git pull":

      A---------------M your 'master' (fully merges 'origin')
     /               / 
 ---X---U---V---W---Y   public 'master'

you want to create a history like this?

      A---J             your 'master' (lacks V, W and Y)
     /   /
 ---X---U---V---W---Y   public 'master'

For that, you can fetch first.

 git fetch origin

Then look at the history in gitk

 gitk master origin

And find the commit you are interested in merging (U in the above picture). And merge it.

 git merge origin~3

Replace "origin~3" in the example above with whatever commit you want to merge the entire history leading to it.

You can repeat this final step as many times you want. For example, if you want create a history like this:

      A---J---K---L---M your 'master'
     /   /   /   /   / 
 ---X---U---V---W---Y   public 'master'

you can do so by repeating the last step for V, W and Y in turn.

In general the public history isn't necessarily a single straight line like this picture and it doesn't make sense to merge one at a time for all the commits on the public branch, but if that is what you really want to do, you can do so.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

^ permalink raw reply

* Re: [PATCH-v2/RFC 3/6] xutils: fix ignore-all-space on incomplete line
From: Junio C Hamano @ 2009-08-23 21:11 UTC (permalink / raw)
  To: Thell Fowler; +Cc: git, Johannes.Schindelin
In-Reply-To: <alpine.DEB.2.00.0908231515020.29625@GWPortableVCS>

Thell Fowler <git@tbfowler.name> writes:

>> Or we can just move the final else clause up and start the function like
>> this:
>> 
>> 	int i1, i2;
>> 
>> 	if (!(flags & XDF_WHITESPACE_FLAGS))
>>  		return s1 == s2 && !memcmp(l1, l2, s1);
>> 
>> 	i1 = i2 = 0;
>>  	if (flags & XDF_IGNORE_WHITESPACE) {
>> 		...
>> 
>> that would get rid of two unnecessary clearing of variables (i1 and i2,
>> even though I suspect that the compiler _could_ optimize them out without
>> such an change), and three flags-bit check in the most common case of not
>> ignoring any whitespaces.
>> 
>
> HA!  That's a nifty way to do that with the variables.

My tentative draft to replace the "how about this" patch further reworks
the loop structure and currently looks like this.

It adds net 15 lines but among that 12 lines are comments, which is not so
bad.

-- >8 --
Subject: [PATCH] xutils: Fix xdl_recmatch() on incomplete lines

Thell Fowler noticed that various "ignore whitespace" options to git diff
do not work well on an incomplete line.

The loop control of the function responsible for these bugs was extremely
difficult to follow.  This patch restructures the loops for three variants
of "ignore whitespace" logic.

The basic idea of the re-written logic is:

 - A loop runs while the characters from both strings we are looking at
   match.  We declare unmatch immediately when we find something that does
   not match and return false from the function.  We break out of the loop
   if we ran out of either side of the string.

   The way we skip spaces inside this loop varies depending on the style
   of ignoring whitespaces.

 - After the above loop breaks, we know that the parts of the strings we
   inspected so far match, ignoring the whitespaces.  The lines can match
   only if the remainder consists of nothing but whitespaces.  This part
   of the logic is shared across all three styles.

The new code is more obvious and should be much easier to follow.

Tested-by: Thell Fowler <git@tbfowler.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 xdiff/xutils.c |   77 +++++++++++++++++++++++++++++++++----------------------
 1 files changed, 46 insertions(+), 31 deletions(-)

diff --git a/xdiff/xutils.c b/xdiff/xutils.c
index 9411fa9..eb7b597 100644
--- a/xdiff/xutils.c
+++ b/xdiff/xutils.c
@@ -190,48 +190,63 @@ int xdl_recmatch(const char *l1, long s1, const char *l2, long s2, long flags)
 {
 	int i1, i2;
 
+	if (!(flags & XDF_WHITESPACE_FLAGS))
+		return s1 == s2 && !memcmp(l1, l2, s1);
+
+	i1 = 0;
+	i2 = 0;
+
+	/*
+	 * -w matches everything that matches with -b, and -b in turn
+	 * matches everything that matches with --ignore-space-at-eol.
+	 *
+	 * Each flavor of ignoring needs different logic to skip whitespaces
+	 * while we have both sides to compare.
+	 */
 	if (flags & XDF_IGNORE_WHITESPACE) {
-		for (i1 = i2 = 0; i1 < s1 && i2 < s2; ) {
-			if (isspace(l1[i1]))
-				while (isspace(l1[i1]) && i1 < s1)
-					i1++;
-			if (isspace(l2[i2]))
-				while (isspace(l2[i2]) && i2 < s2)
-					i2++;
-			if (i1 < s1 && i2 < s2 && l1[i1++] != l2[i2++])
+		goto skip_ws;
+		while (i1 < s1 && i2 < s2) {
+			if (l1[i1++] != l2[i2++])
 				return 0;
+		skip_ws:
+			while (i1 < s1 && isspace(l1[i1]))
+				i1++;
+			while (i2 < s2 && isspace(l2[i2]))
+				i2++;
 		}
-		return (i1 >= s1 && i2 >= s2);
 	} else if (flags & XDF_IGNORE_WHITESPACE_CHANGE) {
-		for (i1 = i2 = 0; i1 < s1 && i2 < s2; ) {
-			if (isspace(l1[i1])) {
-				if (!isspace(l2[i2]))
-					return 0;
-				while (isspace(l1[i1]) && i1 < s1)
-					i1++;
-				while (isspace(l2[i2]) && i2 < s2)
-					i2++;
-			} else if (l1[i1++] != l2[i2++])
-				return 0;
-		}
-		return (i1 >= s1 && i2 >= s2);
-	} else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL) {
-		for (i1 = i2 = 0; i1 < s1 && i2 < s2; ) {
-			if (l1[i1] != l2[i2]) {
+		while (i1 < s1 && i2 < s2) {
+			if (isspace(l1[i1]) && isspace(l2[i2])) {
+				/* Skip matching spaces and try again */
 				while (i1 < s1 && isspace(l1[i1]))
 					i1++;
 				while (i2 < s2 && isspace(l2[i2]))
 					i2++;
-				if (i1 < s1 || i2 < s2)
-					return 0;
-				return 1;
+				continue;
 			}
+			if (l1[i1++] != l2[i2++])
+				return 0;
+		}
+	} else if (flags & XDF_IGNORE_WHITESPACE_AT_EOL) {
+		while (i1 < s1 && i2 < s2 && l1[i1++] == l2[i2++])
+			; /* keep going */
+	}
+
+	/*
+	 * After running out of one side, the remaining side must have
+	 * nothing but whitespace for the lines to match.
+	 */
+	if (i1 < s1) {
+		while (i1 < s1 && isspace(l1[i1]))
 			i1++;
+		return (s1 == i1);
+	}
+	if (i2 < s2) {
+		while (i2 < s2 && isspace(l2[i2]))
 			i2++;
-		}
-		return i1 >= s1 && i2 >= s2;
-	} else
-		return s1 == s2 && !memcmp(l1, l2, s1);
+		return (s2 == i2);
+	}
+	return 1;
 }
 
 static unsigned long xdl_hash_record_with_whitespace(char const **data,
-- 
1.6.4.1.255.g5556a

^ permalink raw reply related

* Re: [PATCH-v2/RFC 3/6] xutils: fix ignore-all-space on incomplete line
From: Junio C Hamano @ 2009-08-23 21:14 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: Thell Fowler, git, Johannes.Schindelin
In-Reply-To: <20090824060708.6117@nanako3.lavabit.com>

Nanako Shiraishi <nanako3@lavabit.com> writes:

> There are left handed people whose scissors run in the wrong direction.

Heh.

> diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
> index b0906ef..38c01e4 100644
> --- a/builtin-mailinfo.c
> +++ b/builtin-mailinfo.c
> @@ -725,7 +725,8 @@ static int scissors(const struct strbuf *line)
>  			scissors_dashes_seen |= 02;
>  			continue;
>  		}
> -		if (i + 1 < len && !memcmp(buf + i, ">8", 2)) {
> +		if (i + 1 < len &&
> +		    !memcmp(buf + i, ">8", 2) || !memcmp(buf + i, "8<", 2)) {
>  			scissors_dashes_seen |= 01;

You need a pair of parentheses around the memcmp || memcmp.

I'll squash that in.

^ permalink raw reply

* Re: [PATCH] import-tars: Allow per-tar author and commit message.
From: Nanako Shiraishi @ 2009-08-23 21:24 UTC (permalink / raw)
  To: Peter Krefting; +Cc: git
In-Reply-To: <20090823203640.B195D189B12@perkele>

Quoting Peter Krefting <peter@softwolves.pp.se>

> Instead of having each imported tar ball's commit message be "Imported
> from filename.tar", optionally take a commit message from a file
> called "filename.tar.msg".
>
> Instead of having each commit have the same author and committer
> information, optionally read the committer information from a file
> called "filename.tar.committer" and author from a file called
> "filename.tar.author".

Instead of requiring the user to have millions of separate files, how about reading a single metainfo file that may look like this?

    [file "git-1.0.0.tar"]
	message = "Commit log message for the first revision"
	author = "A U Thor <au.thor@example.xz>"

    [file "git-1.0.1.tar"]
	message = "Commit log message for the first maintenance revision"
	author = "F I Xer <fi.xer@example.xz>"

and give the name of that metainfo file from the command line? The message may be awkward to put in the metainfo file itself, and it might be easier to refer to the name of a file that is outside the metainfo file itself, but the point is that doing so will both reduce the clutter in your folders, and will give people an option to avoid accidentally reading from random files in the same folder as the tar files that unfortunately have names that ends with the suffixes you randomly chose in this patch.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

^ permalink raw reply

* Re: [PATCH] import-tars: Allow per-tar author and commit message.
From: Sam Vilain @ 2009-08-23 21:46 UTC (permalink / raw)
  To: Peter Krefting; +Cc: git
In-Reply-To: <20090823203640.B195D189B12@perkele>

Peter Krefting wrote:
> Instead of having each imported tar ball's commit message be "Imported
> from filename.tar", optionally take a commit message from a file
> called "filename.tar.msg".
>
> Instead of having each commit have the same author and committer
> information, optionally read the committer information from a file
> called "filename.tar.committer" and author from a file called
> "filename.tar.author".
>
> Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
> ---
> I used this (albeit based on a slightly earlier verison of the script)
> to generate a better-looking history when importing
> http://git.debian.org/?p=crashmail/jamnntpd.git and
> http://git.debian.org/?p=crashmail/crashmail.git into Git, using
> excerpts from the embedded change history as commit messages.
>
>  contrib/fast-import/import-tars.perl |   42 +++++++++++++++++++++++++++++++--
>  1 files changed, 39 insertions(+), 3 deletions(-)
>
> diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
> index 78e40d2..7aad16f 100755
> --- a/contrib/fast-import/import-tars.perl
> +++ b/contrib/fast-import/import-tars.perl
> @@ -109,12 +109,48 @@ foreach my $tar_file (@ARGV)
>  		$have_top_dir = 0 if $top_dir ne $1;
>  	}
>  
> +	# Optionally read a commit message from <filename.tar>.msg
> +	my $commit_msg = "Imported from $tar_file.";
> +	if (open MSG, '<', "${tar_file}.msg")
> +	{
> +		$commit_msg = '';
> +		while (<MSG>)
> +		{
> +			$commit_msg .= $_;
> +		}
> +		close MSG;
> +	}
> +
> +	# Optionally read a committer from <filename.tar>.committer
> +	# (first line is name, second line is e-mail address).
> +	my $this_committer_name = $committer_name;
> +	my $this_committer_email = $committer_email;
> +	if (open COMMITTER, '<', "${tar_file}.committer")
> +	{
> +		($this_committer_name, $this_committer_email) = <COMMITTER>;
> +		chomp $this_committer_name;
> +		chomp $this_committer_email;
> +		close COMMITTER;
> +	}
> +
> +	# Optionally read an author from <filename.tar>.author
> +	# (first line is name, second line is e-mail address).
> +	my $this_author_name = $author_name;
> +	my $this_author_email = $author_email;
> +	if (open AUTHOR, '<', "${tar_file}.author")
> +	{
> +		($this_author_name, $this_author_email) = <AUTHOR>;
> +		chomp $this_author_name;
> +		chomp $this_author_email;
> +		close AUTHOR;
> +	}
> +
>   

It's not necessary to duplicate code like that.

Also I wonder if there isn't a nicer interface for users.  Why not allow
the file to specify From:, Committer: etc as header lines

	# Optionally read a commit message from <filename.tar>.msg
	my $commit_msg = "Imported from $tar_file.";
	my ($committer, $commit_date, $author, $author_date);
	if (open MSG, '<', "${tar_file}.desc")
	{
		my $state = "header";
		$commit_msg = '';
		my $last_val;
		while (<MSG>)
		{
			if ($state eq "header") {
				if (m{^([A-Z][\w\-]+): (.*)}) {
					my ($header, $value) = $1;
					$last_val = ($header eq "Date" ? \$author_date :
						$header eq "From" ? \$author :
						$header eq "Subject" ? \$commit_msg :
						$header eq "Commit-Date" ? \$commit_date :
						$header eq "Committer" ? \$committer :
						undef );
					if ($last_val) {
						$$last_val = $value;
					}
					else {
						warn "ignoring header '$header' in ${tar_file}.desc line $.\n";
					}
				}
				elsif (m{^\s+(.+)}) {
					if ($last_val) {
						$$last_val .= " $1";
					}
				}
				elsif (m{^\s*$}) {
					$commit_msg .= ($commit_msg ? "\n" : "") . "\n";
					$state = "body";
					next;
				}
			}
			if ($state eq "body") {
				$commit_msg .= $_;
			}
		}
		close MSG;
	}

	($this_committer_name, $this_committer_email) =
		choose_email($committer, $committer_name, $committer_email);
	($this_author_name, $this_author_email) =
		choose_email($author, $author_name, $author_email);

	sub choose_email {
		my ($spec_combined, $def_name, $def_email) = @_;
		return ($def_name, $def_email) unless $spec_combined;
		if ($spec_combined =~ m{^([^<]+) <([^@]+@[^@]+)>$})) {
			($1, $2);
		}
		elsif ($spec_combined =~ m{^([^@]+@[^@]+) \((.*)\)$}) {
			($2, $1);
		}
		else {
			warn "Couldn't parse e-mail address '$spec_combined'";
			($def_name, $def_email);
		}
	}

Something like that, anyway...

Sam



>  	print FI <<EOF;
>  commit $branch_ref
> -author $author_name <$author_email> $author_time +0000
> -committer $committer_name <$committer_email> $commit_time +0000
> +author $this_author_name <$this_author_email> $author_time +0000
> +committer $this_committer_name <$this_committer_email> $commit_time +0000
>  data <<END_OF_COMMIT_MESSAGE
> -Imported from $tar_file.
> +$commit_msg
>  END_OF_COMMIT_MESSAGE
>  
>  deleteall
>   

^ permalink raw reply

* [RFC/PATCH 1/3] gitweb: make suspenders more useful
From: Mark Rada @ 2009-08-23 21:53 UTC (permalink / raw)
  To: Jakub Narebski, Junio C Hamano; +Cc: git

In the first block of checks to validate a snapshot request, the last
check is never executed because the second last check is a superset of
the last check.

This change will switch the order of the last two checks, it has the
advantage of giving clients a more specific reason why they cannot get
a specific snapshot format instead of giving them the more generic
response.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
---
 gitweb/gitweb.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4a42f61..7068db2 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -5174,10 +5174,10 @@ sub git_snapshot {
 		die_error(400, "Invalid snapshot format parameter");
 	} elsif (!exists($known_snapshot_formats{$format})) {
 		die_error(400, "Unknown snapshot format");
-	} elsif (!grep($_ eq $format, @snapshot_fmts)) {
-		die_error(403, "Unsupported snapshot format");
 	} elsif ($known_snapshot_formats{$format}{'disabled'}) {
 		die_error(403, "Snapshot format not allowed");
+	} elsif (!grep($_ eq $format, @snapshot_fmts)) {
+		die_error(403, "Unsupported snapshot format");
 	}
 
 	if (!defined $hash) {
-- 
Mark A Rada (ferrous26)
marada@uwaterloo.ca

^ permalink raw reply related

* [RFC/PATCH 2/3] gitweb: break test suite into library and tests
From: Mark Rada @ 2009-08-23 21:52 UTC (permalink / raw)
  To: Jakub Narebski, Junio C Hamano; +Cc: git

To accommodate additions to the tests cases for gitweb, the preamble
from t9500 is now in its library so that new sets of tests for gitweb
can use the same setup without copying the same code.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
---
 t/gitweb-lib.sh                        |   79 ++++++++++++++++++++++++++++++++
 t/t9500-gitweb-standalone-no-errors.sh |   74 +-----------------------------
 2 files changed, 80 insertions(+), 73 deletions(-)
 create mode 100644 t/gitweb-lib.sh

diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh
new file mode 100644
index 0000000..3a60fa5
--- /dev/null
+++ b/t/gitweb-lib.sh
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# Copyright (c) 2007 Jakub Narebski
+#
+
+test_description='gitweb as standalone script (basic tests).
+
+This test runs gitweb (git web interface) as CGI script from
+commandline, and checks that it would not write any errors
+or warnings to log.'
+
+gitweb_init () {
+	safe_pwd="$(perl -MPOSIX=getcwd -e 'print quotemeta(getcwd)')"
+	cat >gitweb_config.perl <<EOF
+#!/usr/bin/perl
+
+# gitweb configuration for tests
+
+our \$version = 'current';
+our \$GIT = 'git';
+our \$projectroot = "$safe_pwd";
+our \$project_maxdepth = 8;
+our \$home_link_str = 'projects';
+our \$site_name = '[localhost]';
+our \$site_header = '';
+our \$site_footer = '';
+our \$home_text = 'indextext.html';
+our @stylesheets = ('file:///$TEST_DIRECTORY/../gitweb/gitweb.css');
+our \$logo = 'file:///$TEST_DIRECTORY/../gitweb/git-logo.png';
+our \$favicon = 'file:///$TEST_DIRECTORY/../gitweb/git-favicon.png';
+our \$projects_list = '';
+our \$export_ok = '';
+our \$strict_export = '';
+
+EOF
+
+	cat >.git/description <<EOF
+$0 test repository
+EOF
+}
+
+gitweb_run () {
+	GATEWAY_INTERFACE='CGI/1.1'
+	HTTP_ACCEPT='*/*'
+	REQUEST_METHOD='GET'
+	SCRIPT_NAME="$TEST_DIRECTORY/../gitweb/gitweb.perl"
+	QUERY_STRING=""$1""
+	PATH_INFO=""$2""
+	export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD \
+		SCRIPT_NAME QUERY_STRING PATH_INFO
+
+	GITWEB_CONFIG=$(pwd)/gitweb_config.perl
+	export GITWEB_CONFIG
+
+	# some of git commands write to STDERR on error, but this is not
+	# written to web server logs, so we are not interested in that:
+	# we are interested only in properly formatted errors/warnings
+	rm -f gitweb.log &&
+	perl -- "$SCRIPT_NAME" \
+		>gitweb.output 2>gitweb.log &&
+	if grep '^[[]' gitweb.log >/dev/null 2>&1; then false; else true; fi
+
+	# gitweb.log is left for debugging
+	# gitweb.output is used to parse http output
+}
+
+. ./test-lib.sh
+
+if ! test_have_prereq PERL; then
+	say 'skipping gitweb tests, perl not available'
+	test_done
+fi
+
+perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
+    say 'skipping gitweb tests, perl version is too old'
+    test_done
+}
+
+gitweb_init
diff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 6275181..a5b5b26 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -3,79 +3,7 @@
 # Copyright (c) 2007 Jakub Narebski
 #
 
-test_description='gitweb as standalone script (basic tests).
-
-This test runs gitweb (git web interface) as CGI script from
-commandline, and checks that it would not write any errors
-or warnings to log.'
-
-gitweb_init () {
-	safe_pwd="$(perl -MPOSIX=getcwd -e 'print quotemeta(getcwd)')"
-	cat >gitweb_config.perl <<EOF
-#!/usr/bin/perl
-
-# gitweb configuration for tests
-
-our \$version = "current";
-our \$GIT = "git";
-our \$projectroot = "$safe_pwd";
-our \$project_maxdepth = 8;
-our \$home_link_str = "projects";
-our \$site_name = "[localhost]";
-our \$site_header = "";
-our \$site_footer = "";
-our \$home_text = "indextext.html";
-our @stylesheets = ("file:///$TEST_DIRECTORY/../gitweb/gitweb.css");
-our \$logo = "file:///$TEST_DIRECTORY/../gitweb/git-logo.png";
-our \$favicon = "file:///$TEST_DIRECTORY/../gitweb/git-favicon.png";
-our \$projects_list = "";
-our \$export_ok = "";
-our \$strict_export = "";
-
-EOF
-
-	cat >.git/description <<EOF
-$0 test repository
-EOF
-}
-
-gitweb_run () {
-	GATEWAY_INTERFACE="CGI/1.1"
-	HTTP_ACCEPT="*/*"
-	REQUEST_METHOD="GET"
-	SCRIPT_NAME="$TEST_DIRECTORY/../gitweb/gitweb.perl"
-	QUERY_STRING=""$1""
-	PATH_INFO=""$2""
-	export GATEWAY_INTERFACE HTTP_ACCEPT REQUEST_METHOD \
-		SCRIPT_NAME QUERY_STRING PATH_INFO
-
-	GITWEB_CONFIG=$(pwd)/gitweb_config.perl
-	export GITWEB_CONFIG
-
-	# some of git commands write to STDERR on error, but this is not
-	# written to web server logs, so we are not interested in that:
-	# we are interested only in properly formatted errors/warnings
-	rm -f gitweb.log &&
-	perl -- "$SCRIPT_NAME" \
-		>/dev/null 2>gitweb.log &&
-	if grep "^[[]" gitweb.log >/dev/null 2>&1; then false; else true; fi
-
-	# gitweb.log is left for debugging
-}
-
-. ./test-lib.sh
-
-if ! test_have_prereq PERL; then
-	say 'skipping gitweb tests, perl not available'
-	test_done
-fi
-
-perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
-    say 'skipping gitweb tests, perl version is too old'
-    test_done
-}
-
-gitweb_init
+. ./gitweb-lib.sh
 
 # ----------------------------------------------------------------------
 # no commits (empty, just initialized repository)
-- 
1.6.4

^ permalink raw reply related

* [RFC/PATCH 3/3] gitweb: add test cases for snapshot settings
From: Mark Rada @ 2009-08-23 21:53 UTC (permalink / raw)
  To: Jakub Narebski, Junio C Hamano; +Cc: git

This commit adds a new test file (t9501) that is used for gitweb test
cases that parse gitweb output to verify the HTTP status code or
message.

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
---
 t/t9501-gitweb-standalone-http-status.sh |   71 ++++++++++++++++++++++++++++++
 1 files changed, 71 insertions(+), 0 deletions(-)
 create mode 100644 t/t9501-gitweb-standalone-http-status.sh

diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh
new file mode 100644
index 0000000..c4b0479
--- /dev/null
+++ b/t/t9501-gitweb-standalone-http-status.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 Mark Rada
+#
+
+. ./gitweb-lib.sh
+
+# ----------------------------------------------------------------------
+# snapshot settings
+
+test_commit \
+	'SnapshotTest' \
+	'i can has snapshot?'
+
+cat >>gitweb_config.perl <<\EOF
+$feature{'snapshot'}{'override'} = 0;
+EOF
+
+test_expect_success \
+    'snapshots: tgz only default format enabled' \
+    'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
+    grep "Status: 200 OK" gitweb.output &&
+    gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tbz2" &&
+    grep "403 - Unsupported snapshot format" gitweb.output &&
+    gitweb_run "p=.git;a=snapshot;h=HEAD;sf=txz" &&
+    grep "403 - Snapshot format not allowed" gitweb.output &&
+    gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
+    grep "403 - Unsupported snapshot format" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+cat >>gitweb_config.perl <<\EOF
+$feature{'snapshot'}{'default'} = ['tgz','tbz2','txz','zip'];
+EOF
+
+test_expect_success \
+    'snapshots: all enabled in default, use default disabled value' \
+    'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
+    grep "Status: 200 OK" gitweb.output &&
+    gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tbz2" &&
+    grep "Status: 200 OK" gitweb.output &&
+    gitweb_run "p=.git;a=snapshot;h=HEAD;sf=txz" &&
+    grep "403 - Snapshot format not allowed" gitweb.output &&
+    gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
+    grep "Status: 200 OK" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+cat >>gitweb_config.perl <<\EOF
+$known_snapshot_formats{'zip'}{'disabled'} = 1;
+EOF
+
+test_expect_success \
+    'snapshots: zip explicitly disabled' \
+    'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=zip" &&
+    grep "403 - Snapshot format not allowed" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+cat >>gitweb_config.perl <<\EOF
+$known_snapshot_formats{'tgz'}{'disabled'} = 0;
+EOF
+
+test_expect_success \
+    'snapshots: tgz explicitly enabled' \
+    'gitweb_run "p=.git;a=snapshot;h=HEAD;sf=tgz" &&
+    grep "Status: 200 OK" gitweb.output'
+test_debug 'cat gitweb.output'
+
+
+test_done 
-- 
1.6.4

^ permalink raw reply related

* Re: [RFC/PATCH 1/3] gitweb: make suspenders more useful
From: Sam Vilain @ 2009-08-23 22:10 UTC (permalink / raw)
  To: Mark Rada; +Cc: Jakub Narebski, Junio C Hamano, git
In-Reply-To: <4A91BA66.5050108@mailservices.uwaterloo.ca>

Mark Rada wrote:
> Subject: [RFC/PATCH 1/3] gitweb: make suspenders more useful

Suspenders?  Really?

Sam

^ permalink raw reply

* Re: [PATCH-v2/RFC 3/6] xutils: fix ignore-all-space on incomplete line
From: Thell Fowler @ 2009-08-23 22:13 UTC (permalink / raw)
  To: Nanako Shiraishi; +Cc: Junio C Hamano, Thell Fowler, git, Johannes.Schindelin
In-Reply-To: <20090824060708.6117@nanako3.lavabit.com>

Nanako Shiraishi (nanako3@lavabit.com) wrote on Aug 23, 2009:

> Quoting Junio C Hamano <gitster@pobox.com>
> 
> > Having said that, I could use something like this.
> >
> > -- >8 -- cut here -- >8 -- 
> > Subject: [PATCH] Teach mailinfo to ignore everything before -- >8 -- mark
> >
> > This teaches mailinfo the scissors -- >8 -- mark; the command ignores
> > everything before it in the message body.
> >
> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
> 
> There are left handed people whose scissors run in the wrong direction.
> 

Woohoo!  Glad the left handed people aren't being discriminated against. 
;)

BTW - I'm happily using this and think it should be in git!

-- 
Thell

^ permalink raw reply

* Re: [PATCH-v2/RFC 3/6] xutils: fix ignore-all-space on incomplete line
From: Junio C Hamano @ 2009-08-23 22:30 UTC (permalink / raw)
  To: Thell Fowler; +Cc: Nanako Shiraishi, git, Johannes.Schindelin
In-Reply-To: <alpine.DEB.2.00.0908231705200.29625@GWPortableVCS>

Thell Fowler <git@tbfowler.name> writes:

>> > Subject: [PATCH] Teach mailinfo to ignore everything before -- >8 -- mark
> ...
> BTW - I'm happily using this and think it should be in git!

The one I sent out had two bugs.  Please discard and replace it with a
newer one I'll be pushing out on 'pu' later today.

^ permalink raw reply

* Re: [PATCH] gitweb: pull ref markes pull out of subject <a> tag
From: Junio C Hamano @ 2009-08-23 22:31 UTC (permalink / raw)
  To: Giuseppe Bilotta; +Cc: Jakub Narebski, git, Junio C Hamano
In-Reply-To: <cb7bb73a0908231343k3546682ge05cc4f3c3d83638@mail.gmail.com>

Giuseppe Bilotta <giuseppe.bilotta@gmail.com> writes:

> 2009/8/23 Jakub Narebski <jnareb@gmail.com>:
>> For format_subject_html which you are fixing, and which is used by
>> 'shortlog', 'history' and 'tags' views this didn't cause much changes
>> in layout.  But the way gitweb uses git_print_header_div in views such
>> as 'tree', 'blob' etc., where the outer (containing) link is made into
>> *block* element[1] by the way of CSS (display: block) makes layout
>> (visualisation) very screwed up in older browser.  But I don't expect
>> you to fix that.
>>
>> [1] Originally so the area to click is larger.
>
> Fixing that really needs some kind of ridiculously complex
> workarounds, or a totally different layout. That is actually one of
> the situations where nested links make perfect sense, and it's a real
> pity the standard wouldn't allow them, and that some client actually
> altered the DOM to 'fix' it. But anyway.
>
>> Signoff?
>
> Aaaargh. Is it enough if I put it here:
>
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>

I can manage.

Thanks, both.

^ permalink raw reply

* Re: Pulling one commit at a time.
From: Junio C Hamano @ 2009-08-23 22:33 UTC (permalink / raw)
  To: Sanjiv Gupta; +Cc: Nanako Shiraishi, git
In-Reply-To: <20090824060710.6117@nanako3.lavabit.com>

Nanako Shiraishi <nanako3@lavabit.com> writes:

> When your histories look like this:
>
>       A                 your 'master'
>      /
>  ---X---U---V---W---Y   public 'master' (your 'origin')
>
> ... you can fetch first.
>
>  git fetch origin
>
> Then look at the history in gitk
>
>  gitk master origin
>
> And find the commit you are interested in merging (U in the above
> picture). And merge it.
>
>  git merge origin~3
>
> Replace "origin~3" in the example above with whatever commit you want to
> merge the entire history leading to it.

A good description.  Thanks, Nana.

Novice readers should notice the careful wording used here.  She says
"merge the entire history leading to it" instead of simply "merge the
commit".  Merging a commit in git always means merging the entire history
leading to that commit, so they mean the same thing to people who know git
well, but it avoids a misunderstanding that, if you did

    $ git merge V

it might apply the effect of only V, ignoring what U did, on top of your
current state A.  It doesn't.

       A-------M         your 'master'
      /       / 
  ---X---U---V---W---Y   public 'master' (your 'origin')

To create a commit that has only the effect of a single commit, you would
need to cherry-pick it.

    $ git cherry-pick V

will give you

       A-------V'        your 'master'
      /
  ---X---U---V---W---Y   public 'master' (your 'origin')

where "git diff A V'" is a moral equivalent of "git diff U V".

^ permalink raw reply

* Re: [RFC/PATCH 1/3] gitweb: make suspenders more useful
From: Mark Rada @ 2009-08-23 22:39 UTC (permalink / raw)
  To: Sam Vilain; +Cc: Mark Rada, Jakub Narebski, Junio C Hamano, git
In-Reply-To: <4A91BE50.7070103@vilain.net>

On 23/08/09 6:10 PM, Sam Vilain wrote:
> Mark Rada wrote:
>> Subject: [RFC/PATCH 1/3] gitweb: make suspenders more useful
> 
> Suspenders?  Really?
> 
> Sam
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Context:

On 21/08/09 5:43 PM, Junio C Hamano wrote:
> Mark A Rada <marada@uwaterloo.ca> writes:
> 
>> Unless I missed a case, the tests show that the extra condition check
>> that was added in the &git_snapshot routine is never actually executed,
>> because a disabled snapshot format is not added to @snapshot_fmts, which
>> is checked first.
>>
>> snippet:
>> 5178     } elsif (!grep($_ eq $format, @snapshot_fmts)) {
>> 5179         die_error(403, "Unsupported snapshot format");
>> 5180     } elsif ($known_snapshot_formats{$format}{'disabled'}) {
>> 5181         die_error(403, "Snapshot format not allowed");
>> 5182     }
>> 5183
> 
> True; filter_snapshot_fmts looks at 'disabled' first.
> 
> I do not mind keeping these two lines as belt-and-suspender, though.
> 


Yup...I couldn't think of an appropriate title and I expect this
patch to be edited (for another reason) or thrown out anyways.



-- 
Mark A Rada (ferrous26)
marada@uwaterloo.ca

^ permalink raw reply

* Re: [RFC/PATCH 1/3] gitweb: make suspenders more useful
From: Sam Vilain @ 2009-08-23 22:48 UTC (permalink / raw)
  To: Mark Rada; +Cc: Jakub Narebski, Junio C Hamano, git
In-Reply-To: <4A91C512.7000707@mailservices.uwaterloo.ca>

Mark Rada wrote:
>>> Subject: [RFC/PATCH 1/3] gitweb: make suspenders more useful
>>>       
>> Suspenders?  Really?
>>     
> Context:
>
> On 21/08/09 5:43 PM, Junio C Hamano wrote:
>   
>> I do not mind keeping these two lines as belt-and-suspender, though.
>>     
> Yup...I couldn't think of an appropriate title and I expect this
> patch to be edited (for another reason) or thrown out anyways.
>   

Please don't do that.  Use of metaphors makes the code harder to follow,
especially for non-native speakers.  In this case you confused me, a
British/NZ native speaker because you only used half of the idiom; so
all I was left with was a word which in the English where I speak refers
to a piece of clothing worn most often by prostitutes and people at the
Rocky Horror Picture Show.

Can I suggest "snapshot error handling" as a more neutral term...
Sam

^ permalink raw reply

* Re: git-mail-commits (Re: What's a good setup for submitting patches to the list properly?)
From: Julian Phillips @ 2009-08-23 23:05 UTC (permalink / raw)
  To: Christian Couder; +Cc: Nicolas Sebrecht, Thell Fowler, git
In-Reply-To: <200908230911.07218.chriscool@tuxfamily.org>

On Sun, 23 Aug 2009, Christian Couder wrote:

> On Saturday 22 August 2009, Nicolas Sebrecht wrote:
>> The 22/08/09, Christian Couder wrote:
>>> There is "git send-email" that is bundled with git. But I use
>>> git-mail-commits from Julian Philips. I am very happy with it. Thanks
>>> Julian!
>>
>> Isn't there any public repo for it?
>
> Not that I know of, but I think it would be a good idea to publish it
> (perhaps in contrib/).
>
> Julian?

Using the awsome power of git I have managed to extract it from my random 
tools private repo to here as if I had written it to be a separate entity 
from the start:

git://git.q42.co.uk/mail_commits.git
(gitweb: http://git.q42.co.uk/w/mail_commits.git)

If it would be considered useful, then I can also create a patch to add it 
to contrib (there is a master branch in the above repo where I have 
subtree merged it in already - though that was more to experiment with 
doing subtree merging)

-- 
Julian

  ---
The means-and-ends moralists, or non-doers, always end up on their ends
without any means.
 		-- Saul Alinsky

^ permalink raw reply

* Re: git-mail-commits (Re:What's a good setup for submitting patches to the list properly?)
From: Nicolas Sebrecht @ 2009-08-23 23:41 UTC (permalink / raw)
  To: Julian Phillips; +Cc: Christian Couder, Nicolas Sebrecht, Thell Fowler, git
In-Reply-To: <alpine.LNX.2.00.0908232357590.15613@reaper.quantumfyre.co.uk>

The 24/08/09, Julian Phillips wrote:
> On Sun, 23 Aug 2009, Christian Couder wrote:
>
> Using the awsome power of git I have managed to extract it from my random 
> tools private repo to here as if I had written it to be a separate entity 
> from the start:
>
> git://git.q42.co.uk/mail_commits.git
> (gitweb: http://git.q42.co.uk/w/mail_commits.git)

Thanks a lot.

> If it would be considered useful, then I can also create a patch to add 
> it to contrib 

I think it worth. That said, I would first add some config options like
mail-commits.cc (not reviewed that much yet) to be a bit more consistent
with the send-email program. I would also add README and INSTALL files.

Could you please consider to place your code under GPLv2?

-- 
Nicolas Sebrecht

^ permalink raw reply

* What's cooking in git.git (Aug 2009, #04; Sun, 23)
From: Junio C Hamano @ 2009-08-24  1:01 UTC (permalink / raw)
  To: git

Here are the topics that have been cooking.  Commits prefixed with '-' are
only in 'pu' while commits prefixed with '+' are in 'next'.  The ones
marked with '.' do not appear in any of the integration branches, but I am
still holding onto them.

After the 1.6.5 cycle, the next release will be 1.7.0, and we will push
out the planned "push safety" change.  1.7.0 would be a good time to
introduce "justifiable" changes that are not strictly backward compatible.

During 1.6.5 cycle, 'next' will hold topics meant for 1.6.5 and 1.7.0.

--------------------------------------------------
[Graduated to "master"]

* bc/mailsplit-cr-at-eol (2009-08-04) 4 commits
  (merged to 'next' on 2009-08-06 at 6bc7c5c)
 + Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
 + builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
 + builtin-mailinfo,builtin-mailsplit: use strbufs
 + strbuf: add new function strbuf_getwholeline()

* gb/apply-ignore-whitespace (2009-08-04) 1 commit
  (merged to 'next' on 2009-08-06 at 59e2c86)
 + git apply: option to ignore whitespace differences

* cc/replace (2009-05-27) 14 commits.
  (merged to 'next' on 2009-08-02 at b9c4bc0)
 + t6050: check pushing something based on a replaced commit
 + Documentation: add documentation for "git replace"
 + Add git-replace to .gitignore
 + builtin-replace: use "usage_msg_opt" to give better error messages
 + parse-options: add new function "usage_msg_opt"
 + builtin-replace: teach "git replace" to actually replace
 + Add new "git replace" command
 + environment: add global variable to disable replacement
 + mktag: call "check_sha1_signature" with the replacement sha1
 + replace_object: add a test case
 + object: call "check_sha1_signature" with the replacement sha1
 + sha1_file: add a "read_sha1_file_repl" function
 + replace_object: add mechanism to replace objects found in "refs/replace/"
 + refs: add a "for_each_replace_ref" function

* ld/p4 (2009-07-30) 1 commit
  (merged to 'next' on 2009-08-14 at 36d310d)
 + git-p4: stream from perforce to speed up clones

* mr/gitweb-xz (2009-08-06) 3 commits
  (merged to 'next' on 2009-08-14 at b63b8e6)
 + gitweb: add support for XZ compressed snapshots
 + gitweb: update INSTALL regarding specific snapshot settings
 + gitweb: support to globally disable a snapshot format

* jc/verify-pack-stat (2009-08-07) 1 commit
  (merged to 'next' on 2009-08-10 at f80d0e9)
 + verify-pack --stat-only: show histogram without verifying
--------------------------------------------------
[New Topics]

* jc/mailinfo-scissors (2009-08-23) 1 commit
 - Teach mailinfo to ignore everything before -- >8 -- mark

* tf/diff-whitespace-incomplete-line (2009-08-23) 2 commits.
 - xutils: Fix xdl_recmatch() on incomplete lines
 - xutils: Fix hashing an incomplete line with whitespaces at the end

* jc/1.7.0-send-email-no-thread-default (2009-08-22) 1 commit
  (merged to 'next' on 2009-08-22 at 5106de8)
 + send-email: make --no-chain-reply-to the default

* lt/approxidate (2009-08-22) 2 commits
 - Further 'approxidate' improvements
 - Improve on 'approxidate'

* mm/reset-report (2009-08-21) 2 commits
 - reset: make the reminder output consistent with "checkout"
 - Rename REFRESH_SAY_CHANGED to REFRESH_IN_PORCELAIN.

* wl/insta-mongoose (2009-08-21) 1 commit
 - Add support for the Mongoose web server.
--------------------------------------------------
[Stalled]

* sr/gfi-options (2009-08-13) 3 commits
 - fast-import: test the new option command
 - fast-import: add option command
 - fast-import: put option parsing code in seperate functions

What is this used by?

* lt/block-sha1 (2009-08-17) 4 commits
  (merged to 'next' on 2009-08-18 at 67a1ce8)
 + remove ARM and Mozilla SHA1 implementations
 + block-sha1: guard gcc extensions with __GNUC__
 + make sure byte swapping is optimal for git
 + block-sha1: make the size member first in the context struct

Finishing touches ;-)  There were a few Solaris portability patches
floated around that I didn't pick up, waiting for them to finalize.

* js/stash-dwim (2009-07-27) 1 commit.
  (merged to 'next' on 2009-08-16 at 67896c4)
 + Make 'git stash -k' a short form for 'git stash save --keep-index'
 (this branch is used by tr/reset-checkout-patch.)

* tr/reset-checkout-patch (2009-08-18) 8 commits.
  (merged to 'next' on 2009-08-18 at e465bb3)
 + tests: disable interactive hunk selection tests if perl is not available
  (merged to 'next' on 2009-08-16 at 67896c4)
 + DWIM 'git stash save -p' for 'git stash -p'
 + Implement 'git stash save --patch'
 + Implement 'git checkout --patch'
 + Implement 'git reset --patch'
 + builtin-add: refactor the meat of interactive_add()
 + Add a small patch-mode testing library
 + git-apply--interactive: Refactor patch mode code
 (this branch uses js/stash-dwim.)

There was a discussion on better DWIMmery for the above two topics to (1)
forbid "git stash save --anything-with-dash" and (2) redirect with any
option "git stash --opt" to "git stash save --opt", to keep it flexible
and safe at the same time.  I think it is a sane thing to do, but nothing
has happened lately.

* jn/gitweb-blame (2009-08-06) 3 commits
 - gitweb: Create links leading to 'blame_incremental' using JavaScript
 - gitweb: Incremental blame (WIP)
 - gitweb: Add optional "time to generate page" info in footer

Ajax-y blame WIP

* db/vcs-helper (2009-08-09) 17 commits
 - Allow helpers to request marks for fast-import
 - Allow helpers to report in "list" command that the ref is unchanged
 - Add support for "import" helper command
 - transport-helper_init(): fix a memory leak in error path
 - Add a config option for remotes to specify a foreign vcs
 - Allow programs to not depend on remotes having urls
 - Allow fetch to modify refs
 - Use a function to determine whether a remote is valid
 - Use a clearer style to issue commands to remote helpers
  (merged to 'next' on 2009-08-07 at f3533ba)
 + Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible
 + Makefile: do not link three copies of git-remote-* programs
 + Makefile: git-http-fetch does not need expat
  (merged to 'next' on 2009-08-06 at 15da79d)
 + http-fetch: Fix Makefile dependancies
 + Add transport native helper executables to .gitignore
  (merged to 'next' on 2009-08-05 at 33d491e)
 + git-http-fetch: not a builtin
 + Use an external program to implement fetching with curl
 + Add support for external programs for handling native fetches
 (this branch is used by jh/cvs-helper.)

There was a discussion that suggests that the use of colon ':' before vcs
helper name needs to be corrected.  Nothing happened since.

* je/send-email-no-subject (2009-08-05) 1 commit
 - send-email: confirm on empty mail subjects

This seems to break t9001.  Near the tip of 'pu' I have a iffy
workaround.

--------------------------------------------------
[Cooking]

* cc/sequencer-rebase-i (2009-08-21) 17 commits.
 - rebase -i: use "git sequencer--helper --cherry-pick"
 - sequencer: add "--cherry-pick" option to "git sequencer--helper"
 - sequencer: add "do_commit()" and related functions
 - pick: libify "pick_help_msg()"
 - revert: libify pick
 - rebase -i: use "git sequencer--helper --fast-forward"
 - sequencer: let "git sequencer--helper" callers set "allow_dirty"
 - sequencer: add "--fast-forward" option to "git sequencer--helper"
 - sequencer: add "do_fast_forward()" to perform a fast forward
 - rebase -i: use "git sequencer--helper --reset-hard"
 - sequencer: add "--reset-hard" option to "git sequencer--helper"
 - sequencer: add comments about reset_almost_hard()
 - sequencer: add "reset_almost_hard()" and related functions
 - rebase -i: use "git sequencer--helper --make-patch"
 - sequencer: free memory used in "make_patch" function
 - sequencer: add "make_patch" function to save a patch
 - sequencer: add "builtin-sequencer--helper.c"

Migrating "rebase -i" bit by bit to C.  I am inclined to agree with Dscho
that maybe this approach forces the migration to follow the structure of
the shell script too much, and could force a suboptimal end result, but
we'll see.

* aj/fix-read-tree-from-scratch (2009-08-17) 1 commit
  (merged to 'next' on 2009-08-20 at 7a04133)
 + read-tree: Fix regression with creation of a new index file.

Will merge.

* as/maint-graph-interesting-fix (2009-08-18) 1 commit.
 - graph API: fix bug in graph_is_interesting()

I need to queue the associated test after getting it signed-off.

* jc/1.7.0-status (2009-08-15) 3 commits
  (merged to 'next' on 2009-08-22 at b3507bb)
 + git status: not "commit --dry-run" anymore
 + git stat -s: short status output
 + git stat: the beginning of "status that is not a dry-run of commit"
 (this branch uses jc/shortstatus.)

As promised, I squashed incremental "fix-up" into the commits they fix;
this will be kept in 'next' until 1.7.0

* jc/shortstatus (2009-08-15) 11 commits
  (merged to 'next' on 2009-08-15 at 7e40766)
 + git commit --dry-run -v: show diff in color when asked
 + Documentation/git-commit.txt: describe --dry-run
  (merged to 'next' on 2009-08-12 at 53bda17)
 + wt-status: collect untracked files in a separate "collect" phase
 + Make git_status_config() file scope static to builtin-commit.c
 + wt-status: move wt_status_colors[] into wt_status structure
 + wt-status: move many global settings to wt_status structure
 + commit: --dry-run
  (merged to 'next' on 2009-08-06 at fe8cb94)
 + status: show worktree status of conflicted paths separately
 + wt-status.c: rework the way changes to the index and work tree are summarized
 + diff-index: keep the original index intact
 + diff-index: report unmerged new entries
 (this branch is used by jc/1.7.0-status.)

Will cook for a bit more and then merge.

* jc/maint-checkout-index-to-prefix (2009-08-16) 1 commit
  (merged to 'next' on 2009-08-20 at 2f6aea2)
 + check_path(): allow symlinked directories to checkout-index --prefix

Will merge.

* jc/maint-unpack-objects-strict (2009-08-13) 1 commit.
  (merged to 'next' on 2009-08-23 at 38eb750)
 + Fix "unpack-objects --strict"

* jh/submodule-foreach (2009-08-20) 9 commits
  (merged to 'next' on 2009-08-20 at 671bea4)
 + git clone: Add --recursive to automatically checkout (nested) submodules
 + t7407: Use 'rev-parse --short' rather than bash's substring expansion notation
  (merged to 'next' on 2009-08-18 at f4a881d)
 + git submodule status: Add --recursive to recurse into nested submodules
 + git submodule update: Introduce --recursive to update nested submodules
 + git submodule foreach: Add --recursive to recurse into nested submodules
 + git submodule foreach: test access to submodule name as '$name'
 + Add selftest for 'git submodule foreach'
 + git submodule: Cleanup usage string and add option parsing to cmd_foreach()
 + git submodule foreach: Provide access to submodule name, as '$name'

* jl/submodule-summary-diff-files (2009-08-15) 2 commits
  (merged to 'next' on 2009-08-15 at 165bd8e)
 + Documentaqtion/git-submodule.txt: Typofix
  (merged to 'next' on 2009-08-14 at a702e78)
 + git submodule summary: add --files option

Will merge.

* lh/short-decorate (2009-08-15) 1 commit
  (merged to 'next' on 2009-08-18 at b8c1d96)
 + git-log: allow --decorate[=short|full]

Will merge.

* oa/stash-na (2009-08-11) 1 commit
  (merged to 'next' on 2009-08-14 at 12c2e2b)
 + git stash: Give friendlier errors when there is nothing to apply

Will merge.

* jh/notes (2009-07-29) 8 commits.
 - t3302-notes-index-expensive: Speed up create_repo()
 - fast-import: Add support for importing commit notes
 - First draft of notes tree parser with support for fanout subtrees
 - Teach "-m <msg>" and "-F <file>" to "git notes edit"
 - Add an expensive test for git-notes
 - Speed up git notes lookup
 - Add a script to edit/inspect notes
 - Introduce commit notes

The cvs-helper series depends on this one.

* ne/rev-cache (2009-08-21) 6 commits
 . support for path name caching in rev-cache
 . full integration of rev-cache into git, completed test suite
 . administrative functions for rev-cache, start of integration into git
 . support for non-commit object caching in rev-cache
 . basic revision cache system, no integration or features
 . man page and technical discussion for rev-cache

Updated but seems to break tests when merged to 'pu'; didn't look at the
issue deeply.

* jh/cvs-helper (2009-08-18) 7 commits
 - More fixes to the git-remote-cvs installation procedure
 - Fix the Makefile-generated path to the git_remote_cvs package in git-remote-cvs
 - Add simple selftests of git-remote-cvs functionality
 - git-remote-cvs: Remote helper program for CVS repositories
 - 2/2: Add Python support library for CVS remote helper
 - 1/2: Add Python support library for CVS remote helper
 - Basic build infrastructure for Python scripts
 (this branch uses db/vcs-helper.)

Builds on db/vcs-helper.  The testing of Python part seemed to be
still fragile even with the latest fix on one of my boches with an
earlier round already installed, but I didn't look very deeply before
removing the older installation.

* nd/sparse (2009-08-20) 20 commits
 - sparse checkout: inhibit empty worktree
 - Add tests for sparse checkout
 - read-tree: add --no-sparse-checkout to disable sparse checkout support
 - unpack-trees(): ignore worktree check outside checkout area
 - unpack_trees(): apply $GIT_DIR/info/sparse-checkout to the final index
 - unpack-trees(): "enable" sparse checkout and load $GIT_DIR/info/sparse-checkout
 - unpack-trees.c: generalize verify_* functions
 - unpack-trees(): add CE_WT_REMOVE to remove on worktree alone
 - Introduce "sparse checkout"
 - dir.c: export excluded_1() and add_excludes_from_file_1()
 - excluded_1(): support exclude files in index
 - unpack-trees(): carry skip-worktree bit over in merged_entry()
 - Read .gitignore from index if it is skip-worktree
 - Avoid writing to buffer in add_excludes_from_file_1()
 - Teach Git to respect skip-worktree bit (writing part)
 - Teach Git to respect skip-worktree bit (reading part)
 - Introduce "skip-worktree" bit in index, teach Git to get/set this bit
 - Add test-index-version
 - update-index: refactor mark_valid() in preparation for new options
  (merged to 'next' on 2009-08-20 at ea167d7)
 + Prevent diff machinery from examining assume-unchanged entries on worktree

The first one was an independent fix; the rest has been replaced with the
"return of no-checkout" series.

* jc/1.7.0-diff-whitespace-only-status (2009-05-23) 2 commits.
  (merged to 'next' on 2009-08-02 at 9c08420)
 + diff: Rename QUIET internal option to QUICK
 + diff: change semantics of "ignore whitespace" options

For 1.7.0.  This changes exit code from "git diff --ignore-whitespace" and
friends when there is no actual output.  It is a backward incompatible
change, but we could argue that it is a bugfix.

* jc/1.7.0-push-safety (2009-02-09) 2 commits
  (merged to 'next' on 2009-08-02 at 38b82fe)
 + Refuse deleting the current branch via push
 + Refuse updating the current branch in a non-bare repository via push

For 1.7.0.

* jc/log-tz (2009-03-03) 1 commit.
 - Allow --date=local --date=other-format to work as expected

* jc/mailinfo-remove-brackets (2009-07-15) 1 commit.
 - mailinfo: -b option keeps [bracketed] strings that is not a [PATCH] marker
--------------------------------------------------
[I have been too busy to purge these]

* ar/maint-1.6.2-merge-recursive-d-f (2009-05-11) 2 commits.
 . Fix for a merge where a branch has an F->D transition
 . Add a reminder test case for a merge with F/D transition

* jc/merge-convert (2009-01-26) 1 commit.
 . git-merge-file: allow converting the results for the work tree

* lt/read-directory (2009-05-15) 3 commits.
 . Add initial support for pathname conversion to UTF-8
 . read_directory(): infrastructure for pathname character set conversion
 . Add 'fill_directory()' helper function for directory traversal

* ps/blame (2009-03-12) 1 commit.
 . blame.c: start libifying the blame infrastructure

* pb/tracking (2009-07-16) 7 commits.
 . branch.c: if remote is not config'd for branch, don't try delete push config
 . branch, checkout: introduce autosetuppush
 . move deletion of merge configuration to branch.c
 . remote: add per-remote autosetupmerge and autosetuprebase configuration
 . introduce a struct tracking_config
 . branch: install_branch_config and struct tracking refactoring
 . config: allow false and true values for branch.autosetuprebase

Has been ejected from 'pu' for some time, expecting a reroll.

^ permalink raw reply

* Re: What's cooking in git.git (Aug 2009, #04; Sun, 23)
From: Nicolas Pitre @ 2009-08-24  1:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v1vn2qb29.fsf@alter.siamese.dyndns.org>

On Sun, 23 Aug 2009, Junio C Hamano wrote:

> * lt/block-sha1 (2009-08-17) 4 commits
>   (merged to 'next' on 2009-08-18 at 67a1ce8)
>  + remove ARM and Mozilla SHA1 implementations
>  + block-sha1: guard gcc extensions with __GNUC__
>  + make sure byte swapping is optimal for git
>  + block-sha1: make the size member first in the context struct
> 
> Finishing touches ;-)  There were a few Solaris portability patches
> floated around that I didn't pick up, waiting for them to finalize.

Those would be described better as Solaris _optimization_ patches.  The 
code is already fully portable as it is, except not necessarily optimal 
in some cases.


Nicolas

^ 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