Fix issue 553 : Git escape too much character in a UTF-8 shell
Add an option to configure the git core.quotepath option
This commit is contained in:
@@ -230,6 +230,24 @@ class IDF_Plugin_SyncGit_Serve
|
||||
}
|
||||
Pluf_Log::debug(array('IDF_Plugin_Git_Serve::initRepository',
|
||||
'Added post-update hook.', $fullpath));
|
||||
// Configure the core.quotepath option
|
||||
$quotepath = (Pluf::f('git_core_quotepath', true) == true) ? 'true' : 'false';
|
||||
$out = array();
|
||||
$res = 0;
|
||||
exec(sprintf(Pluf::f('idf_exec_cmd_prefix', '').
|
||||
Pluf::f('git_path', 'git').' config -f %s/config --add core.quotepath %s',
|
||||
escapeshellarg($fullpath),
|
||||
escapeshellarg($quotepath)
|
||||
),
|
||||
$out, $res);
|
||||
if ($res != 0) {
|
||||
Pluf_Log::warn(array('IDF_Plugin_Git_Serve::initRepository',
|
||||
'core.quotepath configuration error.',
|
||||
$quotepath));
|
||||
return;
|
||||
}
|
||||
Pluf_Log::debug(array('IDF_Plugin_Git_Serve::initRepository',
|
||||
'core.quotepath configured.', $quotepath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user