charmbracelet / soft-serve

The mighty, self-hostable Git server for the command line🍦
MIT License
5.16k stars 127 forks source link

fix(mirror): skip LFS instead of failing to mirror a repo #525

Closed nilium closed 3 weeks ago

nilium commented 3 months ago

If an LFS client can't be created because it's not compatible for some reason, skip it entirely for a mirrored repo. This prevents one possible crash when mirroring fails. It still seems to crash when accessing user info, so something is still missing. Either way, it seems valid to skip LFS if it just won't work.

Specifically noticed this when trying to import and mirror a repository using a git@github.com:user/repo clone URL, which results in the LFS client being nil. It seemed helpful to keep the error as a warning, but otherwise allow mirroring to continue. There might be a better way to handle this, this just lines up more with how the job.mirror code seems to work at the moment.

aymanbagabas commented 3 weeks ago

Thank you @nilium!