From 43b41a6e89f5458655517584ee019b48ada78dec Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 16 Mar 2013 17:21:58 +0100 Subject: [PATCH] tig.pl: Pass specified arguments to Git or pass --all. --- tig.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}; -- 2.44.1