tig icon indicating copy to clipboard operation
tig copied to clipboard

Feature request: Mark "the other" to diff/log against

Open vanrein opened this issue 4 years ago • 1 comments

I found tig and love it because I need to spend less time in the browser. Thank you!

One thing I commonly do is compare versions, not just one commit but sometimes multiple. Would it be an idea to mark a commit or a ref, then walk up to another, and perform a diff against that?

Similarly, I sometimes appreciate seeing the log form with .. to compare histories as log sequences between branches. That could also benefit from such a marked commit or ref.

In the case of log .., going back and forth yields rather different output (when comparing branches) so a toggle command might be helpful. I suppose reset command for the mark would also be useful.

And if you're interested in the most luxureous variant that I can imagine:
Have a couple of registers like VIM's yank buffers, and use a prefix marker to indicate which is "the other" (a reset to "no other" would be trivial in that form). It would be possible to make multiple comparisons.

I hope these ideas are useful!

vanrein avatar Sep 08 '21 13:09 vanrein

This would be hugely useful, so useful in fact that perhaps I'll even try my hand at implementing this.

~~At the current rate, it'll probably happen after I retire though... :sweat_smile:~~

intelfx avatar May 11 '24 21:05 intelfx