On some systems the commit message gets quoted properly already. Don't
requote in such cases, do quote in all others.master
parent
e972cadf78
commit
1af7d7d842
|
@ -119,12 +119,22 @@ sub cvs_runcvs(@) {
|
||||||
|
|
||||||
sub cvs_shquote_commit ($) {
|
sub cvs_shquote_commit ($) {
|
||||||
my $message = shift;
|
my $message = shift;
|
||||||
|
my $test_message = "CVS autodiscover quoting CVS";
|
||||||
|
|
||||||
eval q{use String::ShellQuote};
|
eval q{use String::ShellQuote};
|
||||||
error($@) if $@;
|
error($@) if $@;
|
||||||
|
eval q{use IPC::Cmd};
|
||||||
|
error($@) if $@;
|
||||||
|
|
||||||
|
my $cmd = ['echo', shell_quote($test_message)];
|
||||||
|
my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
|
||||||
|
IPC::Cmd::run(command => $cmd, verbose => 0);
|
||||||
|
if ((grep /'$test_message'/, @$stdout_buf) > 0) {
|
||||||
|
return IkiWiki::possibly_foolish_untaint($message);
|
||||||
|
} else {
|
||||||
return shell_quote(IkiWiki::possibly_foolish_untaint($message));
|
return shell_quote(IkiWiki::possibly_foolish_untaint($message));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub cvs_is_controlling {
|
sub cvs_is_controlling {
|
||||||
my $dir=shift;
|
my $dir=shift;
|
||||||
|
|
Loading…
Reference in New Issue