wfxr / forgit

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

'gd' does not work with two revisions #187

Closed carlfriedrich closed 2 years ago

carlfriedrich commented 2 years ago

Check list

Environment info

Problem / Steps to reproduce

The forgit:diff function aka gd does not work when I pass two revisions to it in order to get the diff between these two revisions.

The original git command has support for this syntax. From man git diff

SYNOPSIS
       git diff [<options>] [<commit>] [--] [<path>...]
       git diff [<options>] <commit> <commit> [--] [<path>...]

The following command shows me the changes of revision 6560873 compared to its parent.

git diff 6560873^ 6560873

Calling gd with the same arguments returns nothing:

gd 6560873^ 6560873
carlfriedrich commented 2 years ago

@wfxr I made PR #189 to fix this. Please let me know if it can be merged.