]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - tig.pl
tig.pl: Display refs after the author.
[config/dotfiles.git] / tig.pl
diff --git a/tig.pl b/tig.pl
index 615107a993b2d8437cc2ef29bddec31e9955d402..85bebb6c5940bd2087374dab2fae7361e1608b1a 100755 (executable)
--- a/tig.pl
+++ b/tig.pl
@@ -44,7 +44,7 @@ open my $fh, '-|', $cmd or die $!;
 
 while (my $line = <$fh>) {
     # History graph line.
-    if ($line =~ m{^([|/\\ ]+)$}) {
+    if ($line =~ m{^([|/\\_ ]+)$}) {
         print colored($line, $color_graph);
         next;
     }
@@ -64,8 +64,12 @@ while (my $line = <$fh>) {
     # Strip leading whitespace.
     $refs =~ s/^\s+//;
 
-    printf "%s %s %s %s %s %s\n",
-           $prefix, $hash, $date, $author, $message, $refs;
+    if ($refs ne '') {
+        $refs = ' ' . $refs;
+    }
+
+    printf "%s %s %s %s%s %s\n",
+           $prefix, $hash, $date, $author, $refs, $message;
 }
 
 close $fh or die $!;