From 78a901d372af527c99e8860799f7655ba73a4cee Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 11 Mar 2013 17:23:08 +0100 Subject: [PATCH] tig.pl: Detect --graph part correctly. --- tig.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tig.pl b/tig.pl index 77b7d94..e3affa8 100755 --- a/tig.pl +++ b/tig.pl @@ -34,7 +34,8 @@ my $color_ref_reference = 'red bold'; my $color_author = 'magenta'; -my $format = '%h' . '%x00' # abbreviated commit hash +my $format = '%x00' # separator from --graph + . '%h' . '%x00' # abbreviated commit hash . '%at' . '%x00' # author date . '%an' . '%x00' # author name . '%s' . '%x00' # subject @@ -50,7 +51,8 @@ while (my $line = <$fh>) { } # Commit line. - $line =~ /^([ *|]+) (.+)\x00(.+)\x00(.+)\x00(.+)\x00(.*)$/ or die $line; + $line =~ /^([ *|]+)\x00(.+)\x00(.+)\x00(.+)\x00(.+)\x00(.*)$/ + or die $line; my $prefix = $1; my $hash = colored($2, $color_hash); my $date = POSIX::strftime('%Y-%m-%d', localtime($3)); -- 2.45.2