sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.93k stars 107 forks source link

feat(file-history): Added `--walk-reflogs` #413

Closed sindrets closed 1 year ago

sindrets commented 1 year ago

Resolves #353, #396.

                                                *:DiffviewFileHistory*
:[range]DiffviewFileHistory [paths] [options]

    [...]

    Git Options: ~

        [...]

        -g, --walk-reflogs
                Walk reflogs instead of the commit ancestry chain.

Inspecting Diffs for Stashes

The latest Git stash is always stored in the reference refs/stash. We can find all the stashes by traversing the reflog for this reference. This can be achieved with the flag option --walk-reflogs (or it's short form -g). The following command will list all stashes in the file history panel:

:DiffviewFileHistory -g --range=stash