jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.49k stars 611 forks source link

Easily jump to different files of the commitdiff #1325

Closed Rondom closed 7 months ago

Rondom commented 7 months ago

When viewing a commitdiff of some refactoring (for example changing an API or moving things between header-files, it can be a bit cumbersome to jump to the files one is interested in without resorting to regex search.

Example commit: https://github.com/torvalds/linux/commit/322cbb50de711814c42fb088f6d31901502c711a In general when looking at the above commit, I would like to look at the respective two header files and quickly jump to that part of the diff. I can do that with some regex search like blkdev.h[^>], but it is not so intuitive.

Maybe we can have some way to select the file from the diffstat for a start (I guess that is easiest to implement) or some selection box with the list of files to select by arrow keys or fuzzy search. Just putting some ideas out there, I have not really made my mind about what would be a good solution.

koutcher commented 7 months ago

You can press on the filename in the diffstat and it will jump to the file.

Rondom commented 7 months ago

Wow, I thought I had tried that before and it didn't work. Sorry, for the noise, then.