-
Notifications
You must be signed in to change notification settings - Fork 12
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
Removing dependency to git2 #220
Conversation
git2 is replaced by: - in buffrs itself, we now call `git status --porcelain` directly, since `gix` is not able to give us information about untracked files. - in the test-suite, we use `gix` instead of `git2`
Hi, is it possible to use gix for this? If not we can remove the feature altogether. Parsing cli outputs is super error prone and I would like to avoid this. |
As I mention in the issue discussion,
That leaves as multiple options:
I don't have a strong opinion here, so I'll implement what you think is best |
I agree that using That said, I'm fuzzy on why we care about uncommitted changes in the first place. Maybe it's a chance to skim some overreaching features fat. |
Yes, I think I'm too new to have enough context here ;) I'm leaving that decision to @mara-schulke and you |
Okay, so im okay with option 4 but: I would not error when the parsing fails. So I would at most emit a warning here that git could not be found / the output is malformed. Currently your implementation raises errors which would potentially abort the call. If you make it best-effort (say: skip this and emit a warning line to the user) im okay with using |
Should be good for review now. Thanks for all the input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, let's merge
This is related to #217
git2 is replaced by:
git status --porcelain
directly, sincegix
is not able to give us information about untracked files.gix
instead ofgit2
The test suite has been updated to deal with some minor behaviour.
I run
time cargo build
before/after to compare since build time was an issue, here are the results on my laptop (M3):