charmbracelet / soft-serve

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

fix(mirror): add user missing from context #526

Closed nilium closed 3 weeks ago

nilium commented 3 months ago

DeleteRepository, called when mirroring fails, requires access to the user. The user isn't included in the context for the task, so attach the closed over user to the task context.

Noticed this when importing a repo (from #525) and the mirror failed, causing it to try to delete the repo and eventually crash with a segfault accessing user info. The task seems to run with a new context, so hopefully only needed the user attached to the context. In any case, this prevents a segfault now when the changes from #525 aren't also merged.

aymanbagabas commented 3 weeks ago

Thank you so much for your amazing efforts @nilium!