X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Ftig.pl;h=881583d160f6c2fd34c28fd68e69170d0a75e2bd;hb=11b86563f4b8a9eeda0940635f05f169bfe150c6;hp=bde17f39231094eadb7859606c50f339af4b602c;hpb=b3f360e5a569b157939c56b36a74ba8bb950f13f;p=config%2Fdotfiles.git diff --git a/bin/tig.pl b/bin/tig.pl index bde17f3..881583d 100755 --- a/bin/tig.pl +++ b/bin/tig.pl @@ -68,16 +68,15 @@ if (-t STDOUT and defined $pager) { open STDOUT, '|-', $pager or die $!; } -while (my $line = <$fh>) { +while (<$fh>) { # History graph line. - if ($line =~ m{^([|/\\_ ]+)$}) { - print colored($line, $color_graph); + if (m{^([|/\\_ ]+)$}) { + print colored($_, $color_graph); next; } # Commit line. - $line =~ /^([ *|.\\-]+)\x00(.+)\x00(.+)\x00(.+)\x00(.*)\x00(.*)$/ - or die $line; + /^([ *|.\\-]+)\x00(.+)\x00(.+)\x00(.+)\x00(.*)\x00(.*)$/ or die $_; my $prefix = $1; my $hash = colored($2, $color_hash); my $date = POSIX::strftime('%Y-%m-%d', localtime($3));