[PATCH 3/4] gitweb: Extend parse_difftree_raw_line to save commit info

From: Jakub Narebski <jnareb@gmail.com>
Date: 2006-08-31 08:36:04
Extend parse_difftree_raw_line to save commit info from when
git-diff-tree is given only one <tree-ish>, for example when fed
from git-rev-list using --stdin option.

git-diff-tree outputs a line with the commit ID when applicable.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This can be applied regardless that it is proof-of-concept series.
Need checking if it doesn't break anything.

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

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index d8b94a1..b193bc6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1014,9 +1014,9 @@ sub parse_difftree_raw_line {
 		}
 	}
 	# 'c512b523472485aef4fff9e57b229d9d243c967f'
-	#elsif ($line =~ m/^([0-9a-fA-F]{40})$/) {
-	#	$res{'commit'} = $1;
-	#}
+	elsif ($line =~ m/^([0-9a-fA-F]{40})$/) {
+		$res{'commit'} = $1;
+	}
 
 	return wantarray ? %res : \%res;
 }
-- 
1.4.1.1

-
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
Received on Thu Aug 31 08:37:57 2006

This archive was generated by hypermail 2.1.8 : 2006-08-31 08:41:32 EST