RepoSense
RepoSense copied to clipboard
[#442] Replace CommandRunner with JGit for GitBranch
Part of #442.
CommandRunner should be deprecated and replaced by JGit as it
requires Git to be installed and has poor exception handling.
JGit is able to handle Git operations natively, which makes it
more robust to use.
Let's replace usages of CommandRunner with their equivalents in
JGit, starting with GitBranch.
This PR is a proof-of-concept of what JGit can potentially do, instead of relying on CommandRunner.
Good to do a light exploration of this direction at first before going hard at it. For example, we can try to get it working first before deciding whether to merge (hence, no need for a detailed review of the PR first) I'm particularly worried about not being able to use the all/latest features/improvements of Git and not particularly worried about having to install Git first. It's not unreasonable to expect users to have Git if they want to run RepoSense locally. If we decide not to go forward, we should still document pros and cons found.
I have updated my original comment in #442 with a pros and cons list based on the research that I have done on JGit, so that we can make a more informed decision.
As the discussion, I will make it DoNotMerge