]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - bin/tig.pl
bin/tig.pl: remove unnecessary variable
[config/dotfiles.git] / bin / tig.pl
index c5648a81c321589dde508ad92586aebc8de2c7e0..881583d160f6c2fd34c28fd68e69170d0a75e2bd 100755 (executable)
@@ -36,7 +36,7 @@ my $color_author        = 'magenta';
 
 # Aliases in Git with "! ..." are always run in the top-level-directory.
 # GIT_PREFIX contains the relative path to the current subdirectory. Thanks to
-# dr_lepper in #git on Freenode (2013-04-03 23:17) for telling me about
+# dr_lepper in #git on Freenode (2013-04-03 23:17 CEST) for telling me about
 # GIT_PREFIX.
 if (defined $ENV{GIT_PREFIX} and $ENV{GIT_PREFIX} ne '') {
     chdir $ENV{GIT_PREFIX} or die $!;
@@ -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));