-
Notifications
You must be signed in to change notification settings - Fork 277
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
Add changes line #166
Add changes line #166
Conversation
Thanks a lot for your contribution @axdiamond Few remarks:
Looking forward to merge your PR 👍 |
@o2sh I did the other changes, but I'm not sure how to get lines changed from git. git status only shows files modified, not lines. Do you have any suggestions on how I should get the lines changed? |
That's right, we are only interested in file level changes. |
Ooooohhh I'm a silly goose. How does it look now? |
I'm new to rust btw, so any nitpicking is welcome! |
I detected one missing checks --> if one of these
remains equal to zero, it shouldn't be shown in the result.
LGTM, @spenserblack did I miss smth? |
if (modified == 0 || modified && added == 0) , you get a leading whitespace --> I'll trim the result. Thanks a lot for your help @axdiamond , your contribution was very much appreciated 🥇 |
This addresses #165
Onefetch will now show a changes line when there are uncommitted changes in the repo!
Basically, it takes the output of
git diff --shortstat HEAD
, and replace the text with appropriate symbols.