From a128afa3e8eed98e11ca08d0c60518f79e0e9b1a Mon Sep 17 00:00:00 2001 From: Bram Date: Mon, 5 Sep 2022 22:25:57 +0200 Subject: [PATCH] updateAUTHORS.pm: Use `@args` for `git log` cmd Main reason for doing this is shrinking the `git log`-line in size. (Next commit will make it longer) --- Porting/updateAUTHORS.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Porting/updateAUTHORS.pm b/Porting/updateAUTHORS.pm index d29a04340d32..2f3c0c35c526 100644 --- a/Porting/updateAUTHORS.pm +++ b/Porting/updateAUTHORS.pm @@ -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: $!";