PatrickF1 / fzf.fish

🔍🐟 Fzf plugin for Fish
MIT License
1.96k stars 78 forks source link

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

Closed NextAlone closed 2 years ago

PatrickF1 commented 2 years ago

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

NextAlone commented 2 years ago

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 commented 2 years ago

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

NextAlone commented 2 years ago

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

PatrickF1 commented 2 years ago

Oh wait how come you also added --oneline?

PatrickF1 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

NextAlone commented 2 years ago

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 commented 2 years ago

Thank you @NextAlone for this great contribution!

NextAlone commented 2 years ago

Thank you @NextAlone for this great contribution!

And thanks for your work too.