sindrets / diffview.nvim

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

[Feature] Add action for diffing the selected commit range from the history panel #429

Open LintaoAmons opened 8 months ago

LintaoAmons commented 8 months ago

So in IDEA, when we do code review, I like to filter by the commit author's name, then select all the commits made within today, and show to diff view made by all of the commits to save some time.

So wondering if I can achieve the same workflow by diffview.nvim.

Currently I know I can do something like DiffviewOpen SHA1-SHA2 to view all the changes made by the commits in between. But because in my usecase, I need to filter the commits firstly, so the commits is actually discret.

So I was thinking if I can firstly use DiffviewFileHistory, then filter, then select some of the reminding entries, then toggle DiffviewOpen

image

sindrets commented 8 months ago

To do the filtering part in 1 step, you could do:

:DiffviewFileHistory --author="<name>" --since="1 day"

But we don't currently have a way to open a diff for a selected range in the history panel. That sounds useful though. Like an action that lets you visually select a range of commits from the history panel, to open in :DiffviewOpen.

LintaoAmons commented 8 months ago

Hahaha, yeah, if can have that, I will be the coolest guy among my colleagues

imroc commented 7 months ago

I also really want this feature, this will make diffview.nvim very convenient. Before, I copied two commit ids separately and then open a diff view with DiffviewOpen id1...id2, which was very troublesome.