rkotze/git-mob

Avoid shell calls for interacting with git

dideler opened this issue · 0 comments

Right now we're wrapping the git binary in child process calls that are executed in their own shell instance. That's not very efficient.

Consider using libgit bindings or an ini file parser (could be one specific to git config, e.g. https://github.com/jonschlinkert/parse-git-config or https://github.com/eugeneware/git-config).

Note that the parsers will be read-only, so if we use those, there may have to be a compromise where we only use it for reads and continue to use a shell for writes. We could write to the file without going through git, but then we don't get any of the protection that git provides (e.g. helps prevent you from setting illegal config).