Git development
 help / color / mirror / Atom feed
* Re: GPF in index-pack
From: Jon Smirl @ 2006-08-06  2:44 UTC (permalink / raw)
  To: git
In-Reply-To: <9e4733910608051805j1192d910hf55393f1dbe1e472@mail.gmail.com>

Process size is 2.6GB when the seg fault happen. That's a lot of
memory to build a pack index over 1M objects.

I'm running a 3:1 process address space split. I wonder why it didn't
grow all the way to 3GB. I still have RAM and swap available.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply

* Re: [PATCH] git-status: support always/auto/never in colorization
From: Junio C Hamano @ 2006-08-06  0:38 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20060805235756.GA15075@coredump.intra.peff.net>

Jeff King <peff@peff.net> writes:

> Signed-off-by: Jeff King <peff@peff.net>
> ---
> This is on top of the previous two patches:
>     git-status: colorize status output (me)
>     git-status: do not use colors all the time (Matthias)
>
> I was hoping to join the term selection logic with the diff.color logic
> in git_config_termbool or similar (and a git-repo-config --termbool),
> but unfortunately that doesn't work since git-repo-config can't do an
> isatty test (since we call it as `git-repo-config`). In general, config
> parsing is a little awkward (and inefficient) in sh. Is there any
> interest in me converting git-commit/git-status to C builtins (I know
> Johannes will be happy...)?

I was planning to do only the status part in C anyway.

^ permalink raw reply

* Re: Git files data formats documentation
From: Junio C Hamano @ 2006-08-06  0:37 UTC (permalink / raw)
  To: gitzilla; +Cc: git
In-Reply-To: <44D5141A.2070004@gmail.com>

A Large Angry SCM <gitzilla@gmail.com> writes:

> Junio C Hamano wrote:
> ...
>>> <OCTAL_MODE>
>>> 	# Octal encoding, without prefix, of the file system object
>>> 	# type and permission bits. The bit layout is according to the
>>> 	# POSIX standard, with only regular files, directories, and
>>> 	# symbolic links permitted. The actual permission bits are
>>> 	# all zero except for regular files. The only permission bit
>>> 	# of any consequence to Git is the owner executable bit. By
>>> 	# default, the permission bits for files will be either 0644
>>> 	# or 0755, depending on the owner executable bit.
>>> 	;
>>
>> It's not really "by default" -- more like "by definition", since
>> there is no way for the program to use something different.  We
>> used to record non-canonical modes in ancient versions of git,
>> but I think fsck-objects would warn on objects created that way.
>>
>
> See git-mktree.

That's a bad example -- the tool being too loose.

^ permalink raw reply

* [PATCH 4/6] gitweb: Make blob diff -p1 like commit diff
From: Jakub Narebski @ 2006-08-06  0:13 UTC (permalink / raw)
  To: git
In-Reply-To: <200608060206.49086.jnareb@gmail.com>

Add 'a/' and 'b/' as prefix for blobdiff, blobdiff_plain, like it is
in commitdiff, commitdiff_plain.  Ensure that label for /dev/null is
actually /dev/null.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
For consistency.

 gitweb/gitweb.perl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index cdce481..f402c8f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1236,6 +1236,8 @@ sub git_diff_print {
 		print { $fd2 } <$fd>;
 		close $fd2;
 		close $fd;
+	} else {
+		$from_name = "/dev/null";
 	}
 
 	# create tmp to-file
@@ -1247,6 +1249,8 @@ sub git_diff_print {
 		print { $fd2 } <$fd>;
 		close $fd2;
 		close $fd;
+	} else {
+		$to_name = "/dev/null";
 	}
 
 	open my $fd, "-|", "/usr/bin/diff",
@@ -2105,7 +2109,8 @@ sub git_blobdiff {
 	      " -> blob:" .
 	      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blob;h=$hash;hb=$hash_base;f=$file_name")}, $hash) .
 	      "</div>\n";
-	git_diff_print($hash_parent, $file_name || $hash_parent, $hash, $file_name || $hash);
+	git_diff_print($hash_parent, 'a/' . ($file_name || $hash_parent),
+	               $hash,        'b/' . ($file_name || $hash));
 	print "</div>";
 	git_footer_html();
 }
@@ -2113,7 +2118,8 @@ sub git_blobdiff {
 sub git_blobdiff_plain {
 	mkdir($git_temp, 0700);
 	print $cgi->header(-type => "text/plain", -charset => 'utf-8');
-	git_diff_print($hash_parent, $file_name || $hash_parent, $hash, $file_name || $hash, "plain");
+	git_diff_print($hash_parent, 'a/' . ($file_name || $hash_parent),
+	               $hash,        'b/' . ($file_name || $hash), "plain");
 }
 
 sub git_commitdiff {
-- 
1.4.1.1

^ permalink raw reply related

* [PATCH 6/6] gitweb: Refactor git_history_body
From: Jakub Narebski @ 2006-08-06  0:17 UTC (permalink / raw)
  To: git
In-Reply-To: <200608060206.49086.jnareb@gmail.com>

Separates main part of git_history into git_history_body subroutine,
and make output more similar to git_shortlog.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
We couldn't just modify git_shortlog, because git_shortlog reads full
(--max-count limited) output of rev-list to array, which is needed 
for dividing into pages and pagination navigation bar, while git_history
reads rev-list output line by line.

 gitweb/gitweb.perl |   93 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 57 insertions(+), 36 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7ea52b1..2a39145 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1124,6 +1124,62 @@ sub git_shortlog_body {
 	print "</table>\n";
 }
 
+sub git_history_body {
+	# Warning: assumes constant type (blob or tree) during history
+	my ($fd, $refs, $hash_base, $ftype, $extra) = @_;
+
+	print "<table class=\"history\" cellspacing=\"0\">\n";
+	my $alternate = 0;
+	while (my $line = <$fd>) {
+		if ($line !~ m/^([0-9a-fA-F]{40})/) {
+			next;
+		}
+
+		my $commit = $1;
+		my %co = parse_commit($commit);
+		if (!%co) {
+			next;
+		}
+
+		my $ref = format_mark_referencing($refs, $commit);
+
+		if ($alternate) {
+			print "<tr class=\"dark\">\n";
+		} else {
+			print "<tr class=\"light\">\n";
+		}
+		$alternate ^= 1;
+		print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
+		      # shortlog uses      chop_str($co{'author_name'}, 10)
+		      "<td><i>" . esc_html(chop_str($co{'author_name'}, 15, 3)) . "</i></td>\n" .
+		      "<td>";
+		# originally git_history used chop_str($co{'title'}, 50)
+		print_title_html($co{'title'}, $co{'title_short'}, "p=$project;a=commit;h=$commit", 1, $ref);
+		print "</td>\n" .
+		      "<td class=\"link\">" .
+		      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit")}, "commit") . " | " .
+		      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$commit")}, "commitdiff") . " | " .
+		      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=$ftype;hb=$commit;f=$file_name")}, $ftype);
+
+		my $blob_current = git_get_hash_by_path($hash_base, $file_name);
+		my $blob_parent  = git_get_hash_by_path($commit, $file_name);
+		if (defined $blob_current && defined $blob_parent &&
+				$blob_current ne $blob_parent) {
+			print " | " .
+				$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blobdiff;h=$blob_current;hp=$blob_parent;hb=$commit;f=$file_name")},
+				"diff to current");
+		}
+		print "</td>\n" .
+		      "</tr>\n";
+	}
+	if (defined $extra) {
+		print "<tr>\n" .
+		      "<td colspan=\"4\">$extra</td>\n" .
+		      "</tr>\n";
+	}
+	print "</table>\n";
+}
+
 sub git_tags_body {
 	# uses global variable $project
 	my ($taglist, $from, $to, $extra) = @_;
@@ -2295,42 +2351,7 @@ sub git_history {
 
 	open my $fd, "-|",
 		$GIT, "rev-list", "--full-history", $hash_base, "--", $file_name;
-	print "<table cellspacing=\"0\">\n";
-	my $alternate = 0;
-	while (my $line = <$fd>) {
-		if ($line =~ m/^([0-9a-fA-F]{40})/){
-			my $commit = $1;
-			my %co = parse_commit($commit);
-			if (!%co) {
-				next;
-			}
-			my $ref = format_mark_referencing($refs, $commit);
-			if ($alternate) {
-				print "<tr class=\"dark\">\n";
-			} else {
-				print "<tr class=\"light\">\n";
-			}
-			$alternate ^= 1;
-			print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
-			      "<td><i>" . esc_html(chop_str($co{'author_name'}, 15, 3)) . "</i></td>\n" .
-			      "<td>" . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit"), -class => "list"}, "<b>" .
-			      esc_html(chop_str($co{'title'}, 50)) . "$ref</b>") . "</td>\n" .
-			      "<td class=\"link\">" .
-			      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit")}, "commit") .
-			      " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commitdiff;h=$commit")}, "commitdiff") .
-			      " | " . $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=$ftype;hb=$commit;f=$file_name")}, $ftype);
-			my $blob = git_get_hash_by_path($hash_base, $file_name);
-			my $blob_parent = git_get_hash_by_path($commit, $file_name);
-			if (defined $blob && defined $blob_parent && $blob ne $blob_parent) {
-				print " | " .
-				$cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=blobdiff;h=$blob;hp=$blob_parent;hb=$commit;f=$file_name")},
-				"diff to current");
-			}
-			print "</td>\n" .
-			      "</tr>\n";
-		}
-	}
-	print "</table>\n";
+	git_history_body($fd, $refs, $hash_base, $ftype);
 	close $fd;
 	git_footer_html();
 }
-- 
1.4.1.1

^ permalink raw reply related

* [PATCH 5/6] gitweb: Refactor printing shortened title in git_shortlog_body and git_tags_body
From: Jakub Narebski @ 2006-08-06  0:14 UTC (permalink / raw)
  To: git
In-Reply-To: <200608060206.49086.jnareb@gmail.com>

Uses ugly workaround with $bold argument because style is not set via
CSS, but via presentation element <b>...</b>.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Probably needs better name, too

 gitweb/gitweb.perl |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f402c8f..7ea52b1 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1062,6 +1062,27 @@ sub git_print_page_path {
 }
 
 ## ......................................................................
+## functions printing or outputting HTML: inline elements
+
+# print, perhaps shortened and with markers, title line
+sub print_title_html {
+	# $bold argument is workaround until style will be set via CSS
+	my ($long, $short, $query, $bold, $extra) = @_;
+	$extra = '' unless defined($extra);
+
+	if (length($short) < length($long)) {
+		print $cgi->a({-href => "$my_uri?" . esc_param($query),
+		               -class => "list", -title => $long},
+		      ($bold ? "<b>" : "") . esc_html($short) . $extra . ($bold ? "</b>" : ""));
+	} else {
+		print $cgi->a({-href => "$my_uri?" . esc_param($query),
+		               -class => "list"},
+		      ($bold ? "<b>" : "") . esc_html($long)  . $extra . ($bold ? "</b>" : ""));
+	}
+}
+
+
+## ......................................................................
 ## functions printing large fragments of HTML
 
 sub git_shortlog_body {
@@ -1087,15 +1108,7 @@ sub git_shortlog_body {
 		print "<td title=\"$co{'age_string_age'}\"><i>$co{'age_string_date'}</i></td>\n" .
 		      "<td><i>" . esc_html(chop_str($co{'author_name'}, 10)) . "</i></td>\n" .
 		      "<td>";
-		if (length($co{'title_short'}) < length($co{'title'})) {
-			print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit"),
-			               -class => "list", -title => "$co{'title'}"},
-			      "<b>" . esc_html($co{'title_short'}) . "$ref</b>");
-		} else {
-			print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit"),
-			               -class => "list"},
-			      "<b>" . esc_html($co{'title'}) . "$ref</b>");
-		}
+		print_title_html($co{'title'}, $co{'title_short'}, "p=$project;a=commit;h=$commit", 1, $ref);
 		print "</td>\n" .
 		      "<td class=\"link\">" .
 		      $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=commit;h=$commit")}, "commit") . " | " .
@@ -1141,13 +1154,7 @@ sub git_tags_body {
 		      "</td>\n" .
 		      "<td>";
 		if (defined $comment) {
-			if (length($comment_short) < length($comment)) {
-				print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}"),
-				               -class => "list", -title => $comment}, $comment_short);
-			} else {
-				print $cgi->a({-href => "$my_uri?" . esc_param("p=$project;a=tag;h=$tag{'id'}"),
-				               -class => "list"}, $comment);
-			}
+			print_title_html($comment, $comment_short, "p=$project;a=tag;h=$tag{'id'}");
 		}
 		print "</td>\n" .
 		      "<td class=\"selflink\">";
-- 
1.4.1.1

^ permalink raw reply related

* [PATCH 3/6] gitweb: Remove unused parse_date invocation from git_shortlog_body
From: Jakub Narebski @ 2006-08-06  0:13 UTC (permalink / raw)
  To: git
In-Reply-To: <200608060206.49086.jnareb@gmail.com>

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Remainder from refactoring

 gitweb/gitweb.perl |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index b72f12f..cdce481 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1077,7 +1077,6 @@ sub git_shortlog_body {
 		#my $ref = defined $refs ? format_mark_referencing($refs, $commit) : '';
 		my $ref = format_mark_referencing($refs, $commit);
 		my %co = parse_commit($commit);
-		my %ad = parse_date($co{'author_epoch'});
 		if ($alternate) {
 			print "<tr class=\"dark\">\n";
 		} else {
-- 
1.4.1.1

^ permalink raw reply related

* [PATCH 2/6] gitweb: Simplify git_diff_print
From: Jakub Narebski @ 2006-08-06  0:11 UTC (permalink / raw)
  To: git
In-Reply-To: <200608060206.49086.jnareb@gmail.com>

Copy to temporaty file more directly, not using temporary variable @file.
Use list form of open for diff invocation (we cannot use git-diff because
first it doesn't support -L/--label option, and we cannot generate diff
between /dev/null and blob given by it's sha1 identifier). 

Use "local $/ = undef;" for (temporary) slurp mode.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 60113da..b72f12f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1230,31 +1230,31 @@ sub git_diff_print {
 
 	# create tmp from-file
 	if (defined $from) {
+		local $/ = undef;
 		$from_tmp = "$git_temp/gitweb_" . $$ . "_from";
 		open my $fd2, "> $from_tmp";
 		open my $fd, "-|", $GIT, "cat-file", "blob", $from;
-		my @file = <$fd>;
-		print $fd2 @file;
+		print { $fd2 } <$fd>;
 		close $fd2;
 		close $fd;
 	}
 
 	# create tmp to-file
 	if (defined $to) {
+		local $/ = undef;
 		$to_tmp = "$git_temp/gitweb_" . $$ . "_to";
 		open my $fd2, "> $to_tmp";
 		open my $fd, "-|", $GIT, "cat-file", "blob", $to;
-		my @file = <$fd>;
-		print $fd2 @file;
+		print { $fd2 } <$fd>;
 		close $fd2;
 		close $fd;
 	}
 
-	open my $fd, "-|", "/usr/bin/diff -u -p -L \'$from_name\' -L \'$to_name\' $from_tmp $to_tmp";
+	open my $fd, "-|", "/usr/bin/diff",
+		'-u', '-p', '-L', $from_name, '-L', $to_name, $from_tmp, $to_tmp;
 	if ($format eq "plain") {
-		undef $/;
+		local $/ = undef;
 		print <$fd>;
-		$/ = "\n";
 	} else {
 		while (my $line = <$fd>) {
 			chomp $line;
-- 
1.4.1.1

^ permalink raw reply related

* [PATCH 1/6] gitweb: Refactor untabifying - converting tabs to spaces
From: Jakub Narebski @ 2006-08-06  0:08 UTC (permalink / raw)
  To: git
In-Reply-To: <200608060206.49086.jnareb@gmail.com>

Add untabify subroutine and use it.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index bf1b10f..60113da 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -222,6 +222,21 @@ sub unquote {
 	return $str;
 }
 
+# escape tabs (convert tabs to spaces)
+sub untabify {
+	my $line = shift;
+
+	while ((my $pos = index($line, "\t")) != -1) {
+		# one out of three implementations used ($pos - 1) instead of $pos
+		if (my $count = (8 - ($pos % 8))) {
+			my $spaces = ' ' x $count;
+			$line =~ s/\t/$spaces/;
+		}
+	}
+
+	return $line;
+}
+
 ## ----------------------------------------------------------------------
 ## HTML aware string manipulation
 
@@ -1255,12 +1270,7 @@ sub git_diff_print {
 				# skip errors
 				next;
 			}
-			while ((my $pos = index($line, "\t")) != -1) {
-				if (my $count = (8 - (($pos-1) % 8))) {
-					my $spaces = ' ' x $count;
-					$line =~ s/\t/$spaces/;
-				}
-			}
+			$line = untabify($line);
 			print "<div class=\"diff$diff_class\">" . esc_html($line) . "</div>\n";
 		}
 	}
@@ -1600,13 +1610,8 @@ HTML
 		$age_class  = age_class($age);
 		$author     = esc_html ($author);
 		$author     =~ s/ /&nbsp;/g;
-		# escape tabs
-		while ((my $pos = index($data, "\t")) != -1) {
-			if (my $count = (8 - ($pos % 8))) {
-				my $spaces = ' ' x $count;
-				$data =~ s/\t/$spaces/;
-			}
-		}
+
+		$data = untabify($data);
 		$data = esc_html ($data);
 
 		print <<HTML;
@@ -1728,12 +1733,7 @@ sub git_blob {
 	while (my $line = <$fd>) {
 		chomp $line;
 		$nr++;
-		while ((my $pos = index($line, "\t")) != -1) {
-			if (my $count = (8 - ($pos % 8))) {
-				my $spaces = ' ' x $count;
-				$line =~ s/\t/$spaces/;
-			}
-		}
+		$line = untabify($line);
 		printf "<div class=\"pre\"><a id=\"l%i\" href=\"#l%i\" class=\"linenr\">%4i</a> %s</div>\n", $nr, $nr, $nr, esc_html($line);
 	}
 	close $fd or print "Reading blob failed.\n";
-- 
1.4.1.1

^ permalink raw reply related

* [PATCH 0/6] gitweb: Further refactoring
From: Jakub Narebski @ 2006-08-06  0:06 UTC (permalink / raw)
  To: git

This series of patches, on top of my merged series
'[PATCH 7/5] Merge changes in "split patch 1" series'
although probably would apply on top of 'next'.

 * [PATCH 1/5] gitweb: Refactor untabifying - converting tabs to spaces
 * [PATCH 2/6] gitweb: Simplify git_diff_print
 * [PATCH 3/6] gitweb: Remove unused parse_date invocation from
   git_shortlog_body
 * [PATCH 4/6] gitweb: Make blob diff -p1 like commit diff
 * [PATCH 5/6] gitweb: Refactor printing shortened title in
   git_shortlog_body and git_tags_body
 * [PATCH 6/6] gitweb: Refactor git_history_body

-- 
Jakub Narebski
Poland

^ permalink raw reply

* [PATCH] git-status: support always/auto/never in colorization
From: Jeff King @ 2006-08-05 23:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Jeff King <peff@peff.net>
---
This is on top of the previous two patches:
    git-status: colorize status output (me)
    git-status: do not use colors all the time (Matthias)

I was hoping to join the term selection logic with the diff.color logic
in git_config_termbool or similar (and a git-repo-config --termbool),
but unfortunately that doesn't work since git-repo-config can't do an
isatty test (since we call it as `git-repo-config`). In general, config
parsing is a little awkward (and inefficient) in sh. Is there any
interest in me converting git-commit/git-status to C builtins (I know
Johannes will be happy...)?

 Documentation/config.txt |    4 +++-
 git-commit.sh            |   13 ++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 83f4627..43766bd 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -224,7 +224,9 @@ showbranch.default::
 
 status.color::
 	A boolean to enable/disable color in the output of
-	gitlink:git-status[1]. Defaults to false.
+	gitlink:git-status[1]. May be set to `true` (or `always`),
+	`false` (or `never`) or `auto`, in which case colors are used
+	only when the output is to a terminal. Defaults to false.
 
 status.color.<slot>::
 	Use customized color for status colorization. `<slot>` is
diff --git a/git-commit.sh b/git-commit.sh
index ad0cbb1..2ab1974 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -20,11 +20,14 @@ case "$0" in
 *status)
 	status_only=t
 	unmerged_ok_if_status=--unmerged
-	[ "`git-repo-config --bool --get status.color`" = 'true' ] &&
-		([ -t 1 ] || (
-			[ -n "$GIT_PAGER_IN_USE" ] &&
-			[ "`git-repo-config --bool --get pager.color`" != 'false' ]
-		)) && color=true
+	case "`git-repo-config --get status.color`" in
+	  always) color=true ;;
+	  never ) color=false ;;
+	  auto  ) test -t 1 -o \( -n "$GIT_PAGER_IN_USE" -a \
+		     "`git-repo-config --bool --get pager.color`" != false \) \
+		  && color=true ;;
+	  *     ) color="`git-repo-config --bool --get status.color`" ;;
+	esac
 	eval `git-repo-config --get-regexp status.color. \
 	      | while read k v; do
 	          echo color_${k#status.color.}=$v
-- 
1.4.2.rc3.gf3bd-dirty

^ permalink raw reply related

* RE: update-ref logs: problem with committer info?
From: Robin Rosenberg @ 2006-08-05 23:55 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: spearce, git
In-Reply-To: <001a01c6b8cd$0a7b5860$c47eedc1@ramsay1.demon.co.uk>

> Yes, I am quite a long way behind, at version 1.4.1, which is light-years
> in git-time!  Unfortunately, since I can't pull from the git repo (I don't
> have internet access from Linux), I won't be able to update until the
> v1.4.2 tar-ball is posted. Yep, not exactly ideal.

Couldn't you track git with another machine? Then copy that clone to
your linux box and then do a local pull from the copied clone. 

There's also the http_proxy, but I guess you know that already.

-- robin

^ permalink raw reply

* Re: [PATCH] git-status: colorize status output
From: Jeff King @ 2006-08-05 23:42 UTC (permalink / raw)
  To: git
In-Reply-To: <20060805202759.GA16186@moooo.ath.cx>

On Sat, Aug 05, 2006 at 10:27:59PM +0200, Matthias Lederhofer wrote:

> I would suggest that all scripts that use colors have a
> always/auto/never (with boolean fallback) option and also honor
> pager.color if the pager is in use.

I'll send out a patch in a moment.

> I don't see the case where git-status and git status behave
> differently (except for git -p status but git-status does not have an
> option for paging at all).

Sorry, I didn't say what I meant at all. My problem was that one
cannot get color with a pager using git-status (by doing
'git-status | less'). The output is not a tty, but GIT_PAGER_IN_USE is
not set (and of course I cannot use '-p'). However, that is a moot point
with always/auto/never, since in such a case I can just use 'always'.

-Peff

^ permalink raw reply

* Re: Git files data formats documentation
From: Jakub Narebski @ 2006-08-05 23:43 UTC (permalink / raw)
  To: git
In-Reply-To: <44D4FC52.6030807@gmail.com>

A Large Angry SCM wrote:

> Jakub Narebski wrote:

>> I do wonder why there is <OCTAL_MODE> (and not <BINARY_OCTAL_MODE>) 
>> but <BINARY_OBJ_ID> (and not <HEX_OBJ_ID>).
>> 
> 
> <OCTAL_MODE> because it's an ASCII string. <BINARY_OBJ_ID> because it's 
> the 20 byte digest.

I meant why git use ASCII string for octal mode, while using 20 byte digest
for object-id in tree format. More consistent would be use binary and
binary, or ASCII and ASCII (i.e. <HEX_OBJ_ID>).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply

* Re: Git files data formats documentation
From: A Large Angry SCM @ 2006-08-05 22:35 UTC (permalink / raw)
  To: git
In-Reply-To: <44D42F0D.3040707@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

A Large Angry SCM wrote:
> This information may be useful for reading and writing the various Git 
> files.

Revised.


[-- Attachment #2: dataformats.txt --]
[-- Type: text/plain, Size: 15198 bytes --]

Git files data formats
======================

OBJECTS
-------
# The object ID, or "name", of an object is
#	_sha-1_digest_( <OBJECT_HEADER> <object_CONTENTS> ).

<BLOB>
	:	_deflate_( <OBJECT_HEADER> <BLOB_CONTENTS> )
	|	<COMPACT_OBJECT_HEADER> _deflate_( <BLOB_CONTENTS> )
	;

<BLOB_CONTENTS>
	:	<DATA>
	;

<TREE>
	:	_deflate_( <OBJECT_HEADER> <TREE_CONTENTS> )
	|	<COMPACT_OBJECT_HEADER> _deflate_( <TREE_CONTENTS> )
	;

<TREE_CONTENTS>
	:	<TREE_ENTRIES>
	;

<TREE_ENTRIES>
	# Tree entries are sorted by the byte sequence that comprises
	# the entry name. However, for the purposes of the sort
	# comparison, entries for tree objects are compared as if the
	# entry name byte sequence has a trailing ASCII '/' (0x2f).
	:	( <TREE_ENTRY> )*
	;

<TREE_ENTRY>
	# The type of the object referenced MUST be appropriate for
	# the mode. Regular files and symbolic links reference a BLOB
	# and directories reference a TREE.
	:	<OCTAL_MODE> <SP> <NAME> <NUL> <BINARY_OBJ_ID>
	;

<COMMIT>
	:	_deflate_( <OBJECT_HEADER> <COMMIT_CONTENTS> )
	|	<COMPACT_OBJECT_HEADER> _deflate_( <COMMIT_CONTENTS> )
	;

<COMMIT_CONTENTS>
	:	"tree" <SP> <HEX_OBJ_ID> <LF>
		( "parent" <SP> <HEX_OBJ_ID> <LF> )*
		"author" <SP>
			<SAFE_NAME> <SP>
			<LT> <SAFE_EMAIL> <GT> <SP>
			<GIT_DATE> <LF>
		"committer" <SP>
			<SAFE_NAME> <SP>
			<LT> <SAFE_EMAIL> <GT> <SP>
			<GIT_DATE> <LF>
		<LF>
		<DATA>
	;

<TAG>
	:	_deflate_( <OBJECT_HEADER> <TAG_CONTENTS> )
	|	<COMPACT_OBJECT_HEADER> _deflate_( <TAG_CONTENTS> )
	;

<TAG_CONTENTS>
	:	"object" <SP> <HEX_OBJ_ID> <LF>
		"type" <SP> <OBJ_TYPE> <LF>
		"tag" <SP> <TAG_NAME> <LF>
		<LF>
		<DATA>
	;

<OBJECT_HEADER>
	:	<OBJ_TYPE> <SP> <DECIMAL_LENGTH> <NUL>
	;

<COMPACT_OBJECT_HEADER>
	# The object type DELTA_ENCODED is not valid in a
	# <COMPACT_OBJECT_HEADER>.
	:	<TYPE_AND_BASE128_SIZE>
	;

<DATA>
	# Uninterpreted sequence of bytes.
	;

<OCTAL_MODE>
	# ASCII encoding of the octal encoding, without prefix or
	# leading zeros, of the file system object type and permission
	# bits. The bit layout is according to the POSIX standard, with
	# only regular files, directories, and symbolic links
	# permitted. The actual permission bits are all zero except for
	# regular files. The only permission bit of any consequence to
	# Git is the owner executable bit. By default, the permission
	# bits for files will be either 0644 or 0755, depending on the
	# owner executable bit.
	;

<NAME>
	# Sequence of bytes not containing the ASCII character byte
	# values NUL (0x00) or "/" (0x2f).
	;

<BINARY_OBJ_ID>
	# The object ID of the referenced object.
	;

<HEX_OBJ_ID>
	# Hexidecimal encoding (lower case) of the <BINARY_OBJ_ID>.
	;

<SAFE_NAME>
	:	<SAFE_STRING> 
	;

<SAFE_EMAIL>
	:	<SAFE_STRING>
	;

<SAFE_STRING>
	# A sequence of bytes not containing the ASCII character byte
	# values NUL (0x00), LF (0x0a), '<' (0c3c), or '>' (0x3e).
	#
	# The sequence may not begin or end with any bytes with the
	# following ASCII character byte values: SPACE (0x20),
	# '.' (0x2e), ',' (0x2c), ':' (0x3a), ';' (0x3b), '<' (0x3c),
	# '>' (0x3e), '"' (0x22), "'" (0x27).
	;

<GIT_DATE>
	:	<SECONDS> <SP> <TZ_OFFSET>
	;

<SECONDS>
	# Base 10, ASCII encoding of the number of seconds since 12:00
	# midnight January 1, 1970, UTC without accounting for leap
	# seconds, and without leading zeros.
	;

<TZ_OFFSET>
	# Signed offset of time zone from UTC.
	:	<TZ_OFFSET_SIGN> <TZ_OFFSET_HOURS> <TZ_OFFSET_MIN>
	;

<TZ_OFFSET_SIGN>
	:	"+"
	|	"-"
	;

<TZ_OFFSET_HOURS>
	:	<DIGIT> <DIGIT>
	;

<TZ_OFFSET_MIN>
	# Valid values are "00" to "59" inclusive.
	:	<DIGIT> <DIGIT>
	;

<DIGIT>
	# ASCII decimal digit.
	;

<OBJ_TYPE>
	:	"blob"
	|	"tree"
	|	"commit"
	|	"tag"
	;

<DECIMAL_LENGTH>
	# Base 10, ASCII encoding of the byte length of the object
	# contents, without leading zeros. The length value does not
	# include the length of the <OBJECT_HEADER>.
	:	( <DIGIT> )+
	;

<SP>
	# ASCII SPACE (0x20) character.
	;

<NUL>
	# ASCII NUL (0x00) character.
	;

<LF>
	# ASCII LF (0x0a) "line feed" character.
	;


PACK FILE
---------
# The name of a pack file is "pack-${PACK_ID}.pack", where ${PACK_ID}
# is the hexidecimal encoding (lower case) of the SHA-1 digest of the
# sorted list of binary object IDs in the pack file without a separator
# between the object IDs. Initially, the ${PACK_ID} for a pack was not
# well defined, effectively making the value 40 random hexidecimal
# (lower case) characters. Recent, non git-core, code depends on the
# uniqueness of ${PACK_ID} across all of the object databases used by
# a repository.

<PACK_FILE>
	:	<PACK_FILE_CONTENTS> <PACK_FILE_CHECKSUM>
	;

<PACK_FILE_CONTENTS>
	:	"PACK" <PACK_VERSION> <PACK_OBJECT_COUNT>
		( <PACKED_OBJECT_HEADER> <PACKED_OBJECT_DATA> )*
		<PACK_FILE_CHECKSUM>
	;

<PACK_VERSION>
	# 32 bit, network byte order, binary integer indicating which
	# version of the pack file format was used to create the pack
	# file.
	;

<PACK_OBJECT_COUNT>
	# 32 bit, network byte order, binary integer containg the
	# number of objects encoded in the pack file.
	;

<PACK_FILE_CHECKSUM>
	:	_sha-1_digest_( <PACK_FILE_CONTENTS> )
	;


<PACKED_OBJECT_HEADER>
	# If the object type is not a DELTA_ENCODED object, the packed
	# object data that follows is the deflated byte sequence of the
	# object without the Git object header. The length value is the
	# byte count of the inflated byte sequence of the object.
	#
	# If the object type is a DELTA_ENCODED object, what follows is
	# the ID of the base object and the deflated delta data to
	# transform the base object into the target object. The type of
	# the target object is the same as that of the base object and
	# the length value is the byte count of the inflated delta
	# data. The base object may also be DELTA_ENCODED but cyclic
	# base object chains are not permitted and the pack file MUST
	# contain all base objects.
	:	<TYPE_AND_BASE128_SIZE>
	;

<TYPE_AND_BASE128_SIZE>
	# A compact, variable length, encoding of the packed object
	# length and type. The first byte is comprised of 3 fields
	# (where bit 0 is the least significant bit in a byte):
	#	bit 7:		more flag
	#	bits 6-4:	object type
	#	bits 3-0:	least significant bits of the object
	#			length.
	# If the more flag is set, the next byte contains more object
	# length bits.
	# The object types corresponding to the object type bits are:
	#	6 5 4
	#	- - -
	#	0 0 0	invalid: Reserved
	#	0 0 1	COMMIT object
	#	0 1 0	TREE object
	#	0 1 1	BLOB object
	#	1 0 0	TAG object
	#	1 0 1	invalid: Reserved
	#	1 1 0	invalid: Reserved
	#	1 1 1	DELTA_ENCODED object
	#
	# If the more flag was set, the next byte will have more length
	# bits and will be comprised to 2 fields:
	#	bit 7:		more flag
	#	bits 6-0:	7 additional, more significant, bits of
	#			the object length
	# If the more flag is set, the next byte contains more object
	# length bits using the same encoding.
	;

<PACKED_OBJECT_DATA>
	:	_deflate_( <DATA> )
	|	<BINARY_OBJ_ID> _deflate_( <DELTA_DATA> )
	;

<DELTA_DATA>
	# Size of the base object encoded as a base 128 number, least
	# significant bits first, using bit 7 (the most significant
	# bit) of each byte to indicate that more bits follow.
	#
	# Size of the result object encoded as a base 128 number, using
	# the same method as used for the base object size.
	#
	# There will then be a sequence of delta hunks.
	# Zero as the value of the first byte of a hunk in reserved.
	#
	# If bit 7 of the first byte of a delta hunk is not set, the
	# hunk is an "insert" hunk and bits 0-6 specify the number of
	# bytes to append to the output buffer from the hunk.
	#
	# If bit 7 of the first byte of a delta hunk is set, the hunk
	# is a "copy" hunk and bits 0-6 specify how the remaining
	# bytes in the hunk make up the base offset and length for the
	# copy. The following C code demonstrate how to determine the
	# base offset and length for the copy:
	#
	#	/* -  -  -  -  -  -  -  -  -  -  -  - *\
	#	 | This reflects version 3 pack files |
	#	\* -  -  -  -  -  -  -  -  -  -  -  - */
	#
	#	byte *data = delta_hunk_start
	#	opcode = *data++
	#	off_t copy_offset= 0;
	#	size_t copy_length = 0;
	#
	#	for (shift=i=0; i<4; i++) {
	#		if (opcode & 0x01) {
	#			copy_offset |= (*data++)<<shift;
	#			}
	#		opcode >>= 1;
	#		shift += 8;
	#		}
	#
	#	for (shift=i=0; i<3; i++) {
	#		if (opcode & 0x01) {
	#			copy_length |= (*data++)<<shift;
	#			}
	#		opcode >>= 1;
	#		shift += 8;
	#		}
	#
	#	if (!copy_length) {
	#		copy_length = 1<<16;
	#		}
	#
	# For version 2 pack files, the size of a copy is limited to
	# 64K bytes or less and bit 6 of the opcode byte is set if the
	# source of the copy is from the buffer of the result object
	# instead of the the base object.
	#
	# It's unknown if any version 2 pack files were created with
	# bit 6 set in the opcode byte; however, the change that added
	# support for version 3 pack files removed the code that would
	# change the copy source to the result buffer.
	#
	#	/* -  -  -  -  -  -  -  -  -  -  -  - *\
	#	 | This reflects version 2 pack files |
	#	\* -  -  -  -  -  -  -  -  -  -  -  - */
	#
	#	byte *data = delta_hunk_start
	#	opcode = *data++
	#	off_t copy_offset= 0;
	#	size_t copy_length = 0;
	#
	#	for (shift=i=0; i<4; i++) {
	#		if (opcode & 0x01) {
	#			copy_offset |= (*data++)<<shift;
	#			}
	#		opcode >>= 1;
	#		shift += 8;
	#		}
	#
	#	for (shift=i=0; i<2; i++) {
	#		if (opcode & 0x01) {
	#			copy_length |= (*data++)<<shift;
	#			}
	#		opcode >>= 1;
	#		shift += 8;
	#		}
	#
	#	if (!copy_length) {
	#		copy_length = 1<<16;
	#		}
	#
	#	copy_from_result = opcode & 0x01
	#
	;


PACK INDEX
----------
# The name of a pack file index is "pack-${PACK_ID}.idx", where
# ${PACK_ID} is the same as that of the pack file that the pack index
# corresponds to.

<PACK_INDEX>
	:	<PACK_INDEX_CONTENTS> <PACK_INDEX_CHECKSUM>
	;

<PACK_INDEX_CONTENTS>
	:	( <INDEX_PARTIAL_COUNT> ){256}
		( <PACK_OBJECT_OFFSET> <BINARY_OBJ_ID> )*
		<PACK_FILE_CHECKSUM>
	;

<INDEX_PARTIAL_COUNT>
	# 32 bit, network byte order, binary integer of the count of
	# objects in the pack file with the first byte of the object
	# ID less than or equal to the index of the count, starting
	# from zero.
	;

<PACK_OBJECT_OFFSET>
	# 32 bit, network byte order, binary integer giving the offset,
	# in bytes from the begining of the pack file, where the
	# encoding of the object starts.
	;

<PACK_INDEX_CHECKSUM>
	:	_sha-1_digest_( <PACK_INDEX_CONTENTS> )
	;


INDEX FILE (CACHE)
------------------

<INDEX_FILE>
	:	<INDEX_FILE_FORMAT_V1>
	|	<INDEX_FILE_FORMAT_V2>
	;

<INDEX_FILE_FORMAT_V1>
	# This format is no longer supported.
	:	<INDEX_HEADER> <INDEX_CHECKSUM> <INDEX_CONTENTS>
	;

<INDEX_FILE_FORMAT_V2>
	:	<INDEX_HEADER> <EXTENDED_INDEX_CONTENTS> <EXTENED_CHECKSUM>
	;

<INDEX_HEADER>
	:	"DIRC" <INDEX_FILE_VERSION> <INDEX_ENTRY_COUNT>
	;

<INDEX_FILE_VERSION>
	# 32 bit, network byte order, binary integer indicating which
	# version of the index file format was used to create the
	# index file.
	;

<INDEX_ENTRY_COUNT>
	# 32 bit, network byte order, binary integer containg the
	# number of index entries in the index file.
	;

<EXTENDED_CHECKSUM>
	:	_sha-1_digest_( <EXTENDED_INDEX_CONTENTS> )
	;

<INDEX_CHECKSUM>
	:	_sha-1_digest_( <INDEX_CONTENTS> )
	;

<INDEX_CONTENTS>
	# Index entries are sorted by the byte sequence that comprises
	# the entry name; with a secondary comparison of the stage bits
	# from the <ENTRY_FLAGS> if the entry name byte sequences are
	# identical.
	:	( <INDEX_ENTRY> )*
	;

<EXTENDED_INDEX_CONTENTS>
	:	<INDEX_CONTENTS> <INDEX_CONTENTS_EXTENSIONS>
	;

<INDEX_ENTRY>
	:	<INDEX_ENTRY_STAT_INFO>
		<ENTRY_ID>
		<ENTRY_FLAGS>
		<ENTRY_NAME>
		<NUL>
		<ENTRY_ZERO_PADDING>
	;

<ENTRY_ZERO_PADDING>
	# The minimum length 0x00 byte sequence necessary to make the
	# written of digested byte length of the <INDEX_ENTRY> a
	# multiple of 8.
	;

<INDEX_ENTRY_STAT_INFO>
	# These fields are used as a part of a heuristic to determine
	# if the file system entity associated with this entry has
	# changed. The names are very *nix centric but the exact
	# contents of each field have no meaning to Git, besides exact
	# match, except for the <ENTRY_MODE> and <ENTRY_SIZE> fields.
	:	<ENTRY_CTIME>
		<ENTRY_MTIME>
		<ENTRY_DEV>
		<ENTRY_INODE>
		<ENTRY_MODE>
		<ENTRY_UID>
		<ENTRY_GID>
		<ENTRY_SIZE>
	;

<ENTRY_CTIME>
	# The timestamp of the last status change of the associated
	# file system entity.
	:	<ENTRY_TIME>
	;

<ENTRY_MTIME>
	# The timestamp of the last modification of the associated
	# file system entity.
	:	<ENTRY_TIME>
	;

<ENTRY_TIME>
	:	<TIME_LSB32> <TIME_NSEC>
	;

<TIME_LSB32>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) timestamp.
	;

<TIME_NSEC>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) more precise
	# timestamp, if available.
	;

<ENTRY_DEV>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) file system
	# device identifier. Use of this field is a compile time
	# option.
	;

<ENTRY_INODE>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) inode number, or
	# equivalent.
	;

<ENTRY_MODE>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) file system
	# entity type and permissions.
	;

<ENTRY_UID>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) file system
	# entity owner identifier.
	;

<ENTRY_GID>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) file system
	# entity group identifier, or equivalent.
	;

<ENTRY_SIZE>
	# 32 bit, network byte order, binary integer containg the lower
	# 32 bits of the entry (file or symbolic link) size.
	;

<ENTRY_ID>
	# Object ID of the of the file system entity contents.
	;

<ENTRY_FLAGS>
	# 16 bit, network byte order, binary integer.
	#	bits 15-14	Reserved
	#	bits 13-12	Entry stage
	#	bits 11-0	Name byte length
	#
	# See git-read-tree(1) for a description of how the stage
	# field is used.
	;

<ENTRY_NAME>
	# File system entity name. Path is normalized and relative to
	# the working directory.
	;

<INDEX_CONTENTS_EXTENSIONS>
	:	( <INDEX_EXTENSION> )*
	;

<INDEX_EXTENSION>
	:	<INDEX_EXTENSION_HEADER>
		<INDEX_EXTENSION_DATA>
	;

<INDEX_EXTENSION_HEADER>
	:	<INDEX_EXTENSION_NAME> <INDEX_EXTENSION_DATA_SIZE>
	;

<INDEX_EXTENSION_NAME>
	# 4 byte sequence identifying how the <INDEX_EXTENSION_DATA>
	# should be interpreted. If the first byte has a value greater
	# than or equal to the ASCII character 'A' (0x41) and less than
	# or equal to the ASCII character 'Z' (0x5a), the extension is
	# optional and does not affect the interpretation of the other
	# contents in the index file. Any non-optional extensions must
	# be understood by the reading application to correctly
	# interpret the index file contents.
	;

<INDEX_EXTENSION_DATA_SIZE>
	# 32 bit, network byte order, binary integer containg the
	# length of the <INDEX_EXTENSION_DATA> byte sequence.
	;

<INDEX_EXTENSION_DATA>
	# Sequence of bytes.
	;



^ permalink raw reply

* Re: Git files data formats documentation
From: A Large Angry SCM @ 2006-08-05 21:56 UTC (permalink / raw)
  To: Junio C Hamano, git
In-Reply-To: <7vac6jfzem.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
...
>> <OCTAL_MODE>
>> 	# Octal encoding, without prefix, of the file system object
>> 	# type and permission bits. The bit layout is according to the
>> 	# POSIX standard, with only regular files, directories, and
>> 	# symbolic links permitted. The actual permission bits are
>> 	# all zero except for regular files. The only permission bit
>> 	# of any consequence to Git is the owner executable bit. By
>> 	# default, the permission bits for files will be either 0644
>> 	# or 0755, depending on the owner executable bit.
>> 	;
> 
> It's not really "by default" -- more like "by definition", since
> there is no way for the program to use something different.  We
> used to record non-canonical modes in ancient versions of git,
> but I think fsck-objects would warn on objects created that way.
> 

See git-mktree.

^ permalink raw reply

* Re: [RFC/PATCH] Fix "grep -w"
From: Junio C Hamano @ 2006-08-05 21:08 UTC (permalink / raw)
  To: Morten Welinder; +Cc: git
In-Reply-To: <118833cc0608051219q7e19800alc05870058973c2e@mail.gmail.com>

"Morten Welinder" <mwelinder@gmail.com> writes:

> 1. Are you sure that going to the end of the first match is correct?
> It seems to me that this will skip matches.  Say you search
> for ".*" on a line that reads
>   " xxx".

It is fine for your example, I think.  .* matches the entire
line the first time, and BOL and EOL are defined to be word
boundaries.  But you are right.  If the pattern is "x xx* x" and
the line is "x x xx x", the first round would match the first 5
bytes, we find that 6th byte 'x' makes it not a word boundary,
and redoing the match starting at 6th is a wrong thing to do.
We should find "x xx x" starting at the 3rd byte.

> 2. What about "^"?

The pattern would not match the second time anyway, so I do not
think it is such a big deal.

But there is another bug I just spotted.  git grep -w -e '^x'
matches line "xxx" (when not cheating with external grep).

> 3. What about empty matches?  That could take a while...

True.  So we would need to make sure we advance at least one.

^ permalink raw reply

* FWD Recent stuff  Have you ever dreamt to have a very hard peenis during all process?
From: Eaton @ 2006-08-05 21:04 UTC (permalink / raw)
  To: git

Good afternoon Buy it now – and this night will be the best in your life Don’t be afraid But without any results… Now it’s possible to do with magic tab You gape for shooting like you had seen in those films… Find what you need: http://isjaser.com/gal/gsm/

^ permalink raw reply

* Re: update-ref logs: problem with committer info?
From: Shawn Pearce @ 2006-08-05 20:33 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: git
In-Reply-To: <001a01c6b8cd$0a7b5860$c47eedc1@ramsay1.demon.co.uk>

Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
> 
> Yes, I am quite a long way behind, at version 1.4.1, which is light-years
> in git-time!  Unfortunately, since I can't pull from the git repo (I don't
> have internet access from Linux), I won't be able to update until the v1.4.2
> tar-ball is posted. Yep, not exactly ideal.

Yea, that's not much fun.  I found that tracking GIT with GIT is
really the easiest way to stay current.  Not having direct net
access makes that nearly impossible.
 
> OK, for now I will refrain from contributing, at least until v1.4.2 is out.
> 
> Sorry for the noise.

Its not noise, three of your five changes were current bugs that
needed fixing.  :-)

-- 
Shawn.

^ permalink raw reply

* Re: [PATCH] git-status: colorize status output
From: Matthias Lederhofer @ 2006-08-05 20:31 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20060805195411.GA4733@sigio.intra.peff.net>

Jeff King <peff@peff.net> wrote:
> On Sat, Aug 05, 2006 at 02:18:21PM +0200, Matthias Lederhofer wrote:
> 
> > I like the colored git status.  Here is a patch to honor isatty(1) and
> > pager_in_use (exporting GIT_PAGER_IN_USE) with pager.color.
> 
> Doesn't this have different behavior when you use 'git-status' rather
> than 'git status'? Maybe rather than a boolean, we would be better off
> with a true/false/auto value similar to diff.color.
I don't see the case where git-status and git status behave
differently (except for git -p status but git-status does not have an
option for paging at all).

^ permalink raw reply

* Re: [PATCH] git-status: colorize status output
From: Matthias Lederhofer @ 2006-08-05 20:27 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20060805194513.GA4836@sigio.intra.peff.net>

Jeff King <peff@peff.net> wrote:
> > Is there any way to do isatty() from shell scripts?
> 
> As Junio said, test -t. :) Is there interest in me adding that feature?
I would suggest that all scripts that use colors have a
always/auto/never (with boolean fallback) option and also honor
pager.color if the pager is in use.

^ permalink raw reply

* RE: update-ref logs: problem with committer info?
From: Ramsay Jones @ 2006-08-05 20:23 UTC (permalink / raw)
  To: spearce, Junio C Hamano; +Cc: git
In-Reply-To: <20060805025600.GA18223@spearce.org>


On Sat 2006-08-05 at 3:56, spearce@spearce.org wrote:

> Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
> > diff --git a/builtin-update-ref.c b/builtin-update-ref.c
> > index 00333c7..83094ab 100644
> > --- a/builtin-update-ref.c
> > +++ b/builtin-update-ref.c
> > @@ -12,6 +12,7 @@ int cmd_update_ref(int argc, const char
> >  	unsigned char sha1[20], oldsha1[20];
> >  	int i;
> >
> > +	setup_ident();
> >  	setup_git_directory();
> >  	git_config(git_default_config);
> > diff --git a/refs.c b/refs.c
> > index 713ca46..a4060d8 100644
> > --- a/refs.c
> > +++ b/refs.c
> > @@ -379,7 +379,6 @@ static int log_ref_write(struct ref_lock
> >  			lock->log_file, strerror(errno));
> >  	}
> >
> > -	setup_ident();
> >  	comitter = git_committer_info(1);
> >  	if (msg) {
> >  		maxlen = strlen(comitter) + strlen(msg) + 2*40 + 5;
>
> These two changes were already fixed by me in 0b0fe4a6 on July
> 10th.  That change is in `next`, in `master` and in v1.4.2-rc3.
> So I expect it to be available in a final release real-soon-now.
> Maybe you should consider running a newer version of GIT?
>

Yes, I am quite a long way behind, at version 1.4.1, which is light-years
in git-time!  Unfortunately, since I can't pull from the git repo (I don't
have internet access from Linux), I won't be able to update until the v1.4.2
tar-ball is posted. Yep, not exactly ideal.

OK, for now I will refrain from contributing, at least until v1.4.2 is out.

Sorry for the noise.

Ramsay

^ permalink raw reply

* Re: Git files data formats documentation
From: A Large Angry SCM @ 2006-08-05 20:15 UTC (permalink / raw)
  To: git
In-Reply-To: <eb2onf$7up$1@sea.gmane.org>

Jakub Narebski wrote:
> A Large Angry SCM wrote:
> 
>> <TREE_ENTRY>
>>         # The type of the object referenced MUST be appropriate for
>>         # the mode. Regular files and symbolic links reference a BLOB
>>         # and directories reference a TREE.
>>         :       <OCTAL_MODE> <SP> <NAME> <NUL> <BINARY_OBJ_ID>
>>         ;
> [...]
>> <OCTAL_MODE>
>>         # Octal encoding, without prefix, of the file system object
>>         # type and permission bits. The bit layout is according to the
>>         # POSIX standard, with only regular files, directories, and
>>         # symbolic links permitted. The actual permission bits are
>>         # all zero except for regular files. The only permission bit
>>         # of any consequence to Git is the owner executable bit. By
>>         # default, the permission bits for files will be either 0644
>>         # or 0755, depending on the owner executable bit.
>>         ;
> 
> I do wonder why there is <OCTAL_MODE> (and not <BINARY_OCTAL_MODE>) 
> but <BINARY_OBJ_ID> (and not <HEX_OBJ_ID>).
> 

<OCTAL_MODE> because it's an ASCII string. <BINARY_OBJ_ID> because it's 
the 20 byte digest.

^ permalink raw reply

* Re: [PATCH] git-status: colorize status output
From: Jeff King @ 2006-08-05 19:54 UTC (permalink / raw)
  To: Matthias Lederhofer; +Cc: Junio C Hamano, git
In-Reply-To: <20060805121821.GB20807@moooo.ath.cx>

On Sat, Aug 05, 2006 at 02:18:21PM +0200, Matthias Lederhofer wrote:

> I like the colored git status.  Here is a patch to honor isatty(1) and
> pager_in_use (exporting GIT_PAGER_IN_USE) with pager.color.

Doesn't this have different behavior when you use 'git-status' rather
than 'git status'? Maybe rather than a boolean, we would be better off
with a true/false/auto value similar to diff.color.

-Peff

^ permalink raw reply

* Re: [PATCH] git-status: colorize status output
From: Jeff King @ 2006-08-05 19:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Matthias Lederhofer, git
In-Reply-To: <7v64h7e7dm.fsf@assigned-by-dhcp.cox.net>

On Sat, Aug 05, 2006 at 04:42:29AM -0700, Junio C Hamano wrote:

> Not that I can think of, but do people really run "git status"?

I do! :) I actually wrote the vim colorizer first and used it for a
week before realizing it was not sufficient, and that I wanted
git-status output colorized, too. So please consider including the
patch.

> I think Jeff's follow-up "vim colorizer" makes a lot more sense
> than colorizing "git status" output -- it gives reminder during
> the last chance the user has to notice such problems, which is
> while composing the commit log message.

It looks like we have some similar emacs stuff in contrib/. Should I
prepare a short patch to create contrib/vim/?

-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