wfxr / forgit

:zzz: A utility tool powered by fzf for using git interactively.
MIT License
4.33k stars 136 forks source link

Improve forgit::diff #221

Closed carlfriedrich closed 1 year ago

carlfriedrich commented 1 year ago

While we can see the compact diff in the preview window on gd, I find it useful to see the complete file when entering the diff. Set the diff context to 10000 for this purpose.

Before: grafik

After: grafik

Furthermore, display the diff range in the fzf prompt to see what we're looking at. With the normal git diff this is part of the diff output anyway, but with diff-so-fancy it's not, so this should be useful.

Before: grafik

After: grafik

Check list

Description

Type of change

Test environment

cjappl commented 1 year ago

Will you do us a favor and attach a screenshot of before and after?

It can be useful in documenting how things are supposed to perform in case of bugs!

Appreciate all of your submissions recently :)

On Sun, Jul 17, 2022 at 7:44 AM, Tim @.***> wrote:

While we can see the compact diff in the preview window on gd, I find it useful to see the complete file when entering the diff. Set the diff context to 10000 for this purpose.

Furthermore, display the diff range in the fzf prompt to see what we're looking at. With the normal git diff this is part of the diff output anyway, but with diff-so-fancy it's not, so this should be useful.

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation

Description

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Documentation change

Test environment

  • Shell

  • bash

  • zsh

  • fish

  • OS

  • Linux

  • Mac OS X

  • Windows

  • Others:


You can view, comment on, or merge this pull request online at:

https://github.com/wfxr/forgit/pull/221

Commit Summary

File Changes

(2 files)

Patch Links:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

carlfriedrich commented 1 year ago

@cjappl Sure! I have updated the PR description with screenshots.

wfxr commented 1 year ago

@carlfriedrich LGTM!

I have renamed the option name and applied this feature to forgit::log (bash / zsh) as well based on your commits. Can you help finish the fish part?

carlfriedrich commented 1 year ago

@wfxr Thanks! I have applied this to fish and squashed your commits into mine.

carlfriedrich commented 1 year ago

@wfxr Thanks for merging!