Skip to content

Commit

Permalink
[5.x] Suppress “packing” git message (#11326)
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell authored Jan 8, 2025
1 parent 8a2ad86 commit bcd529b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Console/Processes/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ protected function prepareErrorOutput($type, $buffer)
'remote: Resolving deltas',
'Permanently added the ECDSA host key for IP address',
'remote: Processed',
'Auto packing the repository',
];

if (Str::contains($buffer, $ignore)) {
Expand Down
8 changes: 8 additions & 0 deletions tests/Git/GitProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ public function it_doesnt_log_processed_references_as_error_output()
$this->simulateLoggableErrorOutput('remote: Processed 1 references in total');
}

#[Test]
public function it_doesnt_log_auto_packing_as_error_output()
{
Log::shouldReceive('error')->never();

$this->simulateLoggableErrorOutput('Error: Auto packing the repository in background for optimum performance.');
}

private function showLastCommit($path)
{
return Process::create($path)->run('git show');
Expand Down

0 comments on commit bcd529b

Please sign in to comment.