tig icon indicating copy to clipboard operation
tig copied to clipboard

Show gpg signature in main view

Open varac opened this issue 7 years ago • 11 comments

I'm working with a few git repos that gpg sign their commits by default. Signatures are shown in the diff view, but it would be awesome to show them in main view as well (i.e. by some nice UTF-8 icons like or - or even better ones that I don't know so far).

varac avatar Oct 17 '17 07:10 varac

I agree this type of hint would be a great addition. Maybe this could be shown before the branch labels.

jonas avatar Oct 18 '17 01:10 jonas

I propose to show it before the commiters name so it indicates a proper signature by the commiter. But since you can customize tig's layout, I'd be also fine with your proposal.

varac avatar Oct 18 '17 08:10 varac

Maybe the author column color can change whether the commit is sign or not (red is not signed, green is signed). It avoids extra space for an other column.

qrevel avatar Nov 17 '17 01:11 qrevel

Note that there is no canonical way of retrieving the keys required to verify these signatures. Core git relies on the local GnuPG keyring. Likewise trust for keys is delegated to the GnuPG trust systems, other than, say, GitHub, where the trust for a key is established by having the user upload their public key to their account.

andreasstieger avatar Jan 18 '18 11:01 andreasstieger

I'd be perfectly fine with showing the local GnuPG keyring trust, everything else would be more work imo. Meaning, the user should be responsible for retrieving the keys outside of tig.

varac avatar Jan 18 '18 12:01 varac

Any updates on this feature?

wcampbell0x2a avatar Mar 08 '19 22:03 wcampbell0x2a

Nope.

andreasstieger avatar Mar 10 '19 18:03 andreasstieger

I haven't had time to finish up the WIP. This will slow down loading of the main view quite a lot because Git will run gnupg for each commit. I guess that is fine for a first implementation. Later, we could look into fetching the signatures only for the visible commits using an extra load phase.

jonas avatar Mar 22 '19 14:03 jonas

Was this (or similar) feature ever implemented?

hossbeast avatar Sep 19 '23 20:09 hossbeast

@hossbeast seems that it was implemented in 261c2763dda60b0aa421ca801cc032b33650f68f but using tig 2.5.8 from homebrew setting set main-view-author-signature = yes in my .tigrc doesn't seem to work.

maks-ucs avatar Jan 16 '24 22:01 maks-ucs

@maks-ucs The commit you linked to is only part of the commit-signatures branch, not the master branch.

As such, it has not been actually integrated.

jcharaoui avatar Jan 17 '24 14:01 jcharaoui