]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - tig.pl
tig.pl: Use array as argument for open().
[config/dotfiles.git] / tig.pl
diff --git a/tig.pl b/tig.pl
index 5fc7625ea46ff91162aab61c897dc3fdc06790f3..3939deb1f5f25bfed13b957fc3fcd43caa6eb2ac 100755 (executable)
--- a/tig.pl
+++ b/tig.pl
@@ -40,8 +40,8 @@ my $format = '%x00'         # separator from --graph
            . '%an' . '%x00' # author name
            . '%s'  . '%x00' # subject
            . '%d';          # ref names
-my $cmd = "git log --all --graph --format='$format'";
-open my $fh, '-|', $cmd or die $!;
+my @cmd = ('git', 'log', '--all', '--graph', "--format=$format");
+open my $fh, '-|', @cmd or die $!;
 
 while (my $line = <$fh>) {
     # History graph line.
@@ -51,7 +51,7 @@ while (my $line = <$fh>) {
     }
 
     # Commit line.
-    $line =~ /^([ *|]+)\x00(.+)\x00(.+)\x00(.+)\x00(.+)\x00(.*)$/
+    $line =~ /^([ *|.-]+)\x00(.+)\x00(.+)\x00(.+)\x00(.+)\x00(.*)$/
         or die $line;
     my $prefix  = $1;
     my $hash    = colored($2, $color_hash);