Open ti-mo opened 1 month ago
Imho relying on the git cli command is not optimal.
Refactoring findRepositoryRoot
would completely remove the need for exec breakout.
Honestly, I wouldn't reach for something much more complex. It's pretty involved to implement correctly, although the codeowners lib already has fnmatch -> regex compilation, which is a large chunk of what's needed. Hard to tell if it works exactly like git's, though.
If we use git as the source of truth for files to manage, there shouldn't be any surprises, it should just work. If someone wants to swap in a pure-Go implementation later, that's fine, but I personally don't think it's worth the engineering effort for a small tool like this.
Fixes #14