gitweb: Extend parse_difftree_raw_line to save commit info
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> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Aug 31, 2006 at 00:36 UTC
0edcb37d6707c8c9b566bcbb51a2d70275bd30da
1 file changed
+3
-3
gitweb/gitweb.perl
+3
-3
@@ -1027,9 +1027,9 @@ sub parse_difftree_raw_line {
1027
}
1028
}
1029
# 'c512b523472485aef4fff9e57b229d9d243c967f'
1030
- #elsif ($line =~ m/^([0-9a-fA-F]{40})$/) {
1031
- # $res{'commit'} = $1;
1032
- #}
1030
+ elsif ($line =~ m/^([0-9a-fA-F]{40})$/) {
1031
+ $res{'commit'} = $1;
1032
+ }
1033
1034
return wantarray ? %res : \%res;
1035
}