Just in case you didn't notice.
Grgit with version 5.x added a second plugin org.ajoberstar.grgit.service which does not unconditionally open a Grgit instance for the project and also behaves better if there is not Git directory.
So in case you want to reduce some own complexity, you could apply that new plugin and use the GrgitService that is registered as extension instead of the custom logic you currently have. :-)
Just in case you didn't notice. Grgit with version 5.x added a second plugin
org.ajoberstar.grgit.service
which does not unconditionally open aGrgit
instance for the project and also behaves better if there is not Git directory.So in case you want to reduce some own complexity, you could apply that new plugin and use the GrgitService that is registered as extension instead of the custom logic you currently have. :-)