refactor system git status processing to use go-git or porcelain=v2
https://github.com/src-d/go-git
This could make shelling out to git completely unnecessary, and could remove some of the complex code related to parsing git porcelain output. It could also be overkill beyond something that already mostly works.
In order to do this, it would involve:
- Assessing the stability of the go-git project and code
- Assessing feature completeness for everything we need from go-git (not immediately obvious how to get the equivalent of our porcelain call to
status -bfor branch and ahead/behind info) - Performance benchmarking to make sure there is no perf regression
This sounds really interesting, but might break my usage. when I type in git, it goes from scmpuff's function, to hub, and then to git.
EDIT: I just realized you probably meant that you'd use go-git after the switch statement, so my use of hub should still be fine
@AndrewSB Yeah, it would be totally internal. Beneath the surface now, scmpuff status makes a system call to git status -b -z. This could (in theory) replace that.