jonas / tig

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

start view at specific commit/rev #1287

Open plgruener opened 1 year ago

plgruener commented 1 year ago

I like to use tig --all as a history browser and see the relations of branches (which branches is featurex branched off of/merged into…?)

Right now tig always opens (the main view) at the most recent commit (as determined by the commit ordering I guess). Even when you invoke it like tig rev2 rev1 it always selects the top commit, and you have scroll down or /-search or :goto rev.

It would be nice if, analogous to starting at a certain line number (tig +<number>), we could do something like tig :rev or maybe tig :goto=rev to immediately open it at the specified commit.

Maybe that could also be extended to execute arbitrary :-prompt-commands at startup.

krobelus commented 1 year ago

you can set TIG_SCRIPT to execute arbitrary commands at startup