Skip to content

Commit

Permalink
updateAUTHORS.pm: Use @args for git log cmd
Browse files Browse the repository at this point in the history
Main reason for doing this is shrinking the `git log`-line in size.
(Next commit will make it longer)
  • Loading branch information
Bram authored and demerphq committed Sep 6, 2022
1 parent 5429d8b commit a128afa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Porting/updateAUTHORS.pm
Expand Up @@ -205,13 +205,13 @@ sub read_commit_log {
my $author_info= $self->{author_info} ||= {};
my $mailmap_info= $self->{mailmap_info} ||= {};

my $commit_range= $self->{commit_range} ? qq#'$self->{commit_range}'# : "";
my $commits_read= 0;

my $numstat= $self->{numstat} ? "--numstat" : "";
my @args= ("--pretty='format:$tformat'");
push @args, "--numstat" if $self->{numstat};
push @args, "'$self->{commit_range}'" if $self->{commit_range};

my $last_commit_info;
my $cmd= qq(git log --pretty='format:$tformat' $numstat $commit_range);
my $cmd= qq(git log @args);
$cmd =~ s/'/"/g if $^O =~ /Win/;
open my $fh, "-|", $cmd
or die "Failed to open git log pipe: $!";
Expand Down

0 comments on commit a128afa

Please sign in to comment.