This commit is contained in:
nuno maduro
2026-08-05 19:58:57 +01:00
parent 9f3c4e1e82
commit d112582857
30 changed files with 3200 additions and 11 deletions
+11
View File
@@ -244,6 +244,17 @@ final readonly class ChangedFiles
return $this->gitOutput(['git', 'config', '--get', 'init.defaultBranch']);
}
/**
* Whether the repository has any remote configured.
*
* Advisory like {@see self::defaultBranch()} — a `git` that cannot answer
* is reported as "no remote", and the caller decides what that means.
*/
public function hasRemote(): bool
{
return $this->gitOutput(['git', 'remote']) !== null;
}
/**
* @param array<int, string> $command
*/