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

[Search git log] include diff stats in preview #238

Merged
merged 2 commits into from
May 10, 2022

Conversation

NextAlone
Copy link
Contributor

No description provided.

@PatrickF1
Copy link
Owner

Could you include a screenshot and explain why you think this should be added?

@NextAlone
Copy link
Contributor Author

NextAlone commented May 10, 2022

Could you include a screenshot and explain why you think this should be added?

If one commit is huge, an overview on the top may be helpful to quickly get changed files.
image

@PatrickF1
Copy link
Owner

Did you test this on smaller width screens? I see --stat has a width parameter and i wonder if we should limit it

@NextAlone
Copy link
Contributor Author

NextAlone commented May 10, 2022

Did you test this on smaller width screens? I see --stat has a width parameter and i wonder if we should limit it

It works good, i think width is not needed
image

Copy link
Owner

@PatrickF1 PatrickF1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok great! Thanks for testing it for me.

@PatrickF1
Copy link
Owner

Oh wait how come you also added --oneline?

@PatrickF1
Copy link
Owner

Oh I see, is it because you are running two git show commands, one on top of the other, and the first one is just for the diff so you want a short summary of the commit?

@PatrickF1
Copy link
Owner

Ok I suspect there's a way to run git show to show both the stats and the diff itself. I'll look into it if you'd like.

@NextAlone
Copy link
Contributor Author

Oh I see, is it because you are running two git show commands, one on top of the other, and the first one is just for the diff so you want a short summary of the commit?

Yes, you are right.

@NextAlone
Copy link
Contributor Author

Ok I suspect there's a way to run git show to show both the stats and the diff itself. I'll look into it if you'd like.

I tried looking for it, but couldn't find it. It would be nice if there was a way to show them together.

@PatrickF1
Copy link
Owner

git show HEAD --stat --patch seems to work. Can you try it out?

@NextAlone
Copy link
Contributor Author

NextAlone commented May 10, 2022

git show HEAD --stat --patch seems to work. Can you try it out?

It works, and --patch-with-stat the same.

Update: I just push it here.

image

@PatrickF1 PatrickF1 changed the title feat: add file changes stat to git log preview [Search git log] include diff stats in preview May 10, 2022
@PatrickF1 PatrickF1 merged commit ed6a73d into PatrickF1:main May 10, 2022
@PatrickF1
Copy link
Owner

Thank you @NextAlone for this great contribution!

@NextAlone
Copy link
Contributor Author

Thank you @NextAlone for this great contribution!

And thanks for your work too.

@NextAlone NextAlone deleted the patch-2 branch May 10, 2022 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants