summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8b473d0)
"git apply" will warn about whitespace with the full path of the
patch, which will expose the $TMPDIR environment to users over
HTTP(S).
This change breaks compatibility with git pre-1.8.5, again;
but that was released in late-2013; so hopefully everybody
is on newer versions.
my $patches = $self->{patches};
# we need --ignore-whitespace because some patches are CRLF
my $patches = $self->{patches};
# we need --ignore-whitespace because some patches are CRLF
- my @cmd = qw(git apply --cached --ignore-whitespace
- --whitespace=warn --verbose);
+ my @cmd = (qw(git -C), $dn, qw(apply --cached --ignore-whitespace
+ --whitespace=warn --verbose));
my $len = length(join(' ', @cmd));
my $total = $self->{tot};
my $di; # keep track of the last one for "git ls-files"
my $len = length(join(' ', @cmd));
my $total = $self->{tot};
my $di; # keep track of the last one for "git ls-files"
$di = shift @$patches;
dbg($self, "\napplying [$i/$total] " . di_url($self, $di) .
"\n" . join('', @{$di->{hdr_lines}}));
$di = shift @$patches;
dbg($self, "\napplying [$i/$total] " . di_url($self, $di) .
"\n" . join('', @{$di->{hdr_lines}}));
- my $pn = $total + 1 - $i;
- my $path = "$dn/$pn";
+ my $path = $total + 1 - $i;
$len += length($path) + 1;
push @cmd, $path;
} while (@$patches && $len < $ARG_SIZE_MAX);
$len += length($path) + 1;
push @cmd, $path;
} while (@$patches && $len < $ARG_SIZE_MAX);