replace git show --no-patch option with --quiet (#14160)

* replace git show --no-patch option with --quiet

Older versions of git do not support --no-patch or -q, but both older and modern versions support --quiet.

* Merge #14161

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Mark Nagel 2022-07-30 05:57:26 -07:00 committed by GitHub
parent 5dd23f7d7d
commit 3309750f35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ class Version
{
if ($this->is_git_install) {
$install_dir = base_path();
$version_process = new Process(['git', 'show', '--no-patch', '--pretty=%H|%ct'], $install_dir);
$version_process = new Process(['git', 'show', '--quiet', '--pretty=%H|%ct'], $install_dir);
$version_process->run();
// failed due to permissions issue

View File

@ -66,7 +66,7 @@ class Updates extends BaseValidation
$remote_ver = Version::get()->remoteCommit();
if ($local_ver['sha'] != ($remote_ver['sha'] ?? null)) {
if (empty($local_ver['date'])) {
$process = new Process(['git', 'show', '--no-patch', '--pretty=%H|%ct'], base_path());
$process = new Process(['git', 'show', '--queit', '--pretty=%H|%ct'], base_path());
$process->run();
$error = rtrim($process->getErrorOutput());