summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae74c66)
It turns out `--fixed-value' is a relatively new git-config(1)
feature in git 2.30+ (December 2020). So use the quotemeta
perlop for now since it seems compatible-enough for POSIX ERE
used by git.
for my $kv (@c_extra) {
my ($k, $v) = split(/=/, $kv, 2);
for my $kv (@c_extra) {
my ($k, $v) = split(/=/, $kv, 2);
- # --fixed-value for idempotent invocations
- run_die([@x, qw(--replace-all --fixed-value), "$pfx.$k", $v, $v]);
+ # git 2.30+ has --fixed-value for idempotent invocations,
+ # but that's too new to depend on in 2021. Perl quotemeta
+ # seems compatible enough for POSIX ERE which git uses
+ my $re = '^'.quotemeta($v).'$';
+ run_die([@x, qw(--replace-all), "$pfx.$k", $v, $re]);
}
# needed for git prior to v2.1.0
}
# needed for git prior to v2.1.0