← Commit list

41b4a91123

Viktor Szakats
Viktor Szakats
2026-07-22
SUCCESS Duration: 204s

Subject

scripts: replace/extend `--` with `--end-of-options` in git commands

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

.github/scripts/cleancmd.pl+1 -1
@@ -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);
scripts/badwords+1 -1
@@ -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;
scripts/checksrc.pl+2 -2
@@ -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;
scripts/delta+2 -2
@@ -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
scripts/singleuse.pl+1 -1
@@ -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 = $_;
tests/test1275.pl+1 -1
@@ -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);
}