Tig: Feature Request: Ability to show short commit hash in main view

Created on 22 Oct 2014  Â·  11Comments  Â·  Source: jonas/tig

When I go into git blame view on a file within tig I see the short commit hash for each line of the file. I can then press enter and see the log message and diff for that commit. It would be great for the main view to have the ability to show the short commit hash alongside time/author etc.. This is nice for when you want to copy/paste multiple references quickly without having to move to each one in tig to find the hash.

Thanks!

Most helpful comment

@hossbeast Use set main-view-id = yes and alternatively set main-view-id-width = 20 to set the width of the column.

All 11 comments

You can toggle this in tig with :toggle show-id or you can enable it
permanently via the main-view option.
On Oct 22, 2014 8:19 AM, "Dusty Mabe" [email protected] wrote:

When I go into git blame view on a file within tig I see the short commit
hash for each line of the file. I can then press enter and see the log
message and diff for that commit. It would be great for the main view to
have the ability to show the short commit hash alongside time/author etc..
This is nice for when you want to copy/paste multiple references quickly
without having to move to each one in tig to find the hash.

Thanks!

—
Reply to this email directly or view it on GitHub
https://github.com/jonas/tig/issues/340.

Perfect! Thank you so much

what is the correct incantation to enable this feature in .tigrc?

I have set main-view = yes but it does not work

@hossbeast Use set main-view-id = yes and alternatively set main-view-id-width = 20 to set the width of the column.

It's :toggle id now.

:toggle id worked in Ubuntu 16.04's tig version, but set main-view-id = yes in .tmuxrc.tigrc didn't.

@poige, maybe you should try .tigrc instead of .tmuxrc...

@koutcher thank you, but this was a mistype I've made somehow when commenting. Here's what I meant instead:

%  cat ~/.tigrc; lsb_release -a
set main-view-id = yes

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial

@poige, what is your tig version (tig -v) ?

It's not "my tig version", currently I have Ubuntu 18.04, my comment was purely informational — for those who still use Ubuntu 16.04. I doubt it'd be ever possible to ship a fix into 16.04 package.

It's :toggle id now.

this and SHIFT+x gives me:

`:toggle id` not supported
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustymabe picture dustymabe  Â·  3Comments

elbenfreund picture elbenfreund  Â·  7Comments

dlee picture dlee  Â·  6Comments

proski picture proski  Â·  3Comments

djromero picture djromero  Â·  8Comments