don't append '.git' for sr.ht repositories

This commit is contained in:
Luciano Laratelli 2024-05-03 09:31:05 -04:00
parent 418398a870
commit c901ace21a

View File

@ -98,7 +98,8 @@ public function load_branch()
(str($this->repository_url)->startsWith('https://') || (str($this->repository_url)->startsWith('https://') ||
str($this->repository_url)->startsWith('http://')) && str($this->repository_url)->startsWith('http://')) &&
!str($this->repository_url)->endsWith('.git') && !str($this->repository_url)->endsWith('.git') &&
!str($this->repository_url)->contains('github.com') (!str($this->repository_url)->contains('github.com') ||
!str($this->repository_url)->contains('git.sr.ht'))
) { ) {
$this->repository_url = $this->repository_url . '.git'; $this->repository_url = $this->repository_url . '.git';
} }