. '%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};