Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider refactor to use go-git instead of system git #33

Open
mroth opened this issue Jan 10, 2018 · 2 comments
Open

consider refactor to use go-git instead of system git #33

mroth opened this issue Jan 10, 2018 · 2 comments
Labels

Comments

@mroth
Copy link
Owner

mroth commented Jan 10, 2018

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:

  1. Assessing the stability of the go-git project and code
  2. Assessing feature completeness for everything we need from go-git (not immediately obvious how to get the equivalent of our porcelain call to status -b for branch and ahead/behind info)
  3. Performance benchmarking to make sure there is no perf regression
@mroth mroth added the refactor label Jan 10, 2018
@AndrewSB
Copy link

AndrewSB commented Jan 23, 2018

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

@mroth
Copy link
Owner Author

mroth commented Jan 23, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants