]> asedeno.scripts.mit.edu Git - git.git/commitdiff
gitweb: Extend parse_difftree_raw_line to save commit info
authorJakub Narebski <jnareb@gmail.com>
Wed, 30 Aug 2006 22:36:04 +0000 (00:36 +0200)
committerJunio C Hamano <junkio@cox.net>
Thu, 31 Aug 2006 19:58:31 +0000 (12:58 -0700)
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>
gitweb/gitweb.perl

index 7f6bdaa951114e6fd1e07b9768a43f4eab229c61..0984e856235bcfe5e93c74504b605169d1b65daf 100755 (executable)
@@ -1027,9 +1027,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;
 }