From: Simon Ruderich Date: Sat, 16 Mar 2013 16:21:58 +0000 (+0100) Subject: tig.pl: Pass specified arguments to Git or pass --all. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=43b41a6e89f5458655517584ee019b48ada78dec;p=config%2Fdotfiles.git tig.pl: Pass specified arguments to Git or pass --all. --- diff --git a/tig.pl b/tig.pl index 0d80e1f..e08d79c 100755 --- a/tig.pl +++ b/tig.pl @@ -40,7 +40,9 @@ my $format = '%x00' # separator from --graph . '%an' . '%x00' # author name . '%s' . '%x00' # subject . '%d'; # ref names -my @cmd = ('git', 'log', '--all', '--graph', "--format=$format"); +my @cmd = ('git', 'log', '--graph', "--format=$format", + # use either given arguments or --all to list all commits + (scalar @ARGV) ? @ARGV : '--all'); open my $fh, '-|', @cmd or die $!; my $pager = $ENV{PAGER};