1

In order to prove that I had a signature on a commit I needed to use a this command line command:

   $ git log --show-signature -1

I could not get Magit to display the signature I tried to use the Magit Key (l) and the -S switch.

But could not see the signature details.


Addressing questions to the answer from the magit author

I ran out of space in my comment so I edited my question to reply.

So I validated that each commit was signed using git log --show-signature| cat in my shell in Emacs. Then I redid the command above and looked at individual rows to see the signature - but even when I hit RET as you say above, the signature . I could also not see any evidence when all of the signatures were applied that any of them were signed.

How do I configure the expanded view of the signature so that the RET key will cause the details of the signature as the --show-signature flag requires? I most want to be able to drill in with RET and see exactly the text that is needed. I am concerned that I am missing details in magit that the shell shows properly.

1

The --show-signature argument can be selected in the log popup but it is not actually passed to git log. Instead %G? is added to the value of the --format= argument.

That (%G?) causes some letter to be printed for each commit and the code that parses the log output detects that letter and uses it to determine what face should be used to display the commit message summary. The faces are named magit-signature-.... By default commits with "unproblematic" signatures are displayed the same way as regular text (i.e. like the default face), while other commits are displayed using some flashy color and therefore easily detected.

The reason the signatures are not shown in the log buffer is that Magit usually displays each commit on a single line. Displaying each commits signature on multiple lines would mess that up.


To actually find out what is wrong about the signature you will have to visit the commit itself by pressing RET while point is on that commit in the log.

By default the revision buffer also does not show the signature. To show the signature you have to enable the --show-signature argument for the revision buffer also. To do so visit the revision buffer as usual. Then type D to change the diff arguments used in the current buffer. Then enable the respective argument using = g and finally save that as the default while also refreshing the current buffer using w.

  • I updated the question to address issues that I am still having - by attempting your suggestions and looking for the distinguishing details and not seeing them. – sanug Sep 28 at 14:34
  • Hm it appears I was wrong about that. The revision buffer only showed the signature of a tag, but not of a commit. I have changed that now but it will a few hours for that to be available from Melpa. I'll update my answer pretending you already have a Magit version that supports this. – tarsius Sep 28 at 15:29
  • What is the process for me to try out your new code. I need the precise steps to update the magit code, as no new release has been done, correct? – sanug Oct 2 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.