scripts: replace/extend `--` with `--end-of-options` in git commands
No binary (build failed)
—
(log yok)
| @@ -122,7 +122,7 @@ sub process { | |
| } | |
| my @filemasks = @ARGV; | |
| - | open(my $git_ls_files, '-|', 'git', 'ls-files', '--', @filemasks) or die "Failed running git ls-files: $!"; |
| + | open(my $git_ls_files, '-|', 'git', 'ls-files', '--end-of-options', @filemasks) or die "Failed running git ls-files: $!"; |
| while(my $f = <$git_ls_files>) { | |
| chomp $f; | |
| process($f); | |
| @@ -318,7 +318,7 @@ sub file { | |
| } | |
| my @filemasks = @ARGV; | |
| - | open(my $git_ls_files, '-|', 'git', 'ls-files', '--', ":!:$file", @filemasks) or die "Failed running git ls-files: $!"; |
| + | open(my $git_ls_files, '-|', 'git', 'ls-files', '--end-of-options', ":!:$file", @filemasks) or die "Failed running git ls-files: $!"; |
| my @files; | |
| while(my $each = <$git_ls_files>) { | |
| chomp $each; | |
| @@ -1236,12 +1236,12 @@ sub scanfile { | |
| @copyright = sort {$$b{year} cmp $$a{year}} @copyright; | |
| # if the file is modified, assume commit year this year | |
| - | if(qx(git status -s -- "$file") =~ /^ [MARCU]/) { |
| + | if(qx(git status -s --end-of-options "$file") =~ /^ [MARCU]/) { |
| $commityear = (localtime(time))[5] + 1900; | |
| } | |
| else { | |
| # min-parents=1 to ignore wrong initial commit in truncated repos | |
| - | my $grl = qx(git rev-list --max-count=1 --min-parents=1 --timestamp HEAD -- "$file"); |
| + | my $grl = qx(git rev-list --max-count=1 --min-parents=1 --timestamp --end-of-options HEAD -- "$file"); |
| if($grl) { | |
| chomp $grl; | |
| $commityear = (localtime((split(/ /, $grl))[0]))[5] + 1900; | |
| @@ -131,8 +131,8 @@ my $total = $now - Time::Piece->strptime('19980320', '%Y%m%d')->epoch; | |
| my $totalhttpget = $now - Time::Piece->strptime('19961111', '%Y%m%d')->epoch; | |
| # Number of public functions in libcurl | |
| - | my $apublic = cmd('git', 'grep', '^CURL_EXTERN', '--', 'include/curl'); |
| - | my $bpublic = cmd('git', 'grep', '^CURL_EXTERN', $start, '--', 'include/curl'); |
| + | my $apublic = cmd('git', 'grep', '--end-of-options', '^CURL_EXTERN', '--', 'include/curl'); |
| + | my $bpublic = cmd('git', 'grep', '--end-of-options', '^CURL_EXTERN', $start, '--', 'include/curl'); |
| my $public = $apublic - $bpublic; | |
| # diffstat | |
| @@ -167,7 +167,7 @@ my %api = ( | |
| sub doublecheck { | |
| my ($f, $used) = @_; | |
| - | open(F, '-|', 'git', 'grep', '-Fwle', $f, '--', 'lib', @unittests, 'projects'); |
| + | open(F, '-|', 'git', 'grep', '-Fwl', '--end-of-options', $f, '--', 'lib', @unittests, 'projects'); |
| my @also; | |
| while(<F>) { | |
| my $e = $_; | |
| @@ -29,7 +29,7 @@ use warnings; | |
| my $root = $ARGV[0] || ".."; | |
| my @m; | |
| - | if(open(O, '-|', 'git', 'ls-files', '--', $root)) { |
| + | if(open(O, '-|', 'git', 'ls-files', '--end-of-options', $root)) { |
| push @m, <O>; | |
| close(O); | |
| } | |