You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my Gradle build I'd like to just identify the commit id if it is a Git checkout.
If it is an exported build, or you are in a not-yet-supported worktree, then I just use <unknown>.
But grgit always logs an error if no repository was found.
I'd like to have an option to not log that error, and take care not to cause an NPE without not applying the plugin and opening and closing it manually.
The text was updated successfully, but these errors were encountered:
Well, I guess not too useful.
If the message is displayed, then you are not in a worktree.
If you then execute code that does not take care for null you get an NPE anyway.
And if you took care or are not using the null instance, e. g. it is only used for release purpose, then you would be safe if there were no error.
It might be good to have this as warning or error by default to get notified early up in the build, but actually the one notified is probably not the build author, which most probabyl only runs from a checkout. And build runners might not consider the message and not relay it to the build author.
If the build breaks they will though.
But breaking the build just because it might break is bad imho.
So I'd suggest maybe to log a warning by default, but provide an option to not log this warning or to lower the level to debug. Or of course no option but just level lowered. :-)
In my Gradle build I'd like to just identify the commit id if it is a Git checkout.
If it is an exported build, or you are in a not-yet-supported worktree, then I just use
<unknown>
.But grgit always logs an error if no repository was found.
I'd like to have an option to not log that error, and take care not to cause an NPE without not applying the plugin and opening and closing it manually.
The text was updated successfully, but these errors were encountered: