Fix time-stamping to work with GPG signed commits#64
Conversation
If HEAD is pointing to a signed commit, the result of the expression GET_CURRENT_COMMIT_TIMESTAMP will include GPG info, which in turn will end up in .update.timestamp for the current project.
|
this would bump git version req to ... 2.10 I think - is there another way to avoid it (ie |
|
Given my specific output scenario: $ git log --pretty=format:%cd -n 1 --date=unix
gpg: Signature made Tue Aug 8 10:16:42 2023 EEST
gpg: using RSA key DC57D8288951F46
gpg: Good signature from "Teodor <redacted>" [ultimate]
1691479002Assuming that GPG output will always start with |
|
@arnetheduck Hi, what do you think of just grabbing the last line with |
I think that it's an excellent idea provided you test it with some git versions that ship with non-obsolete LTS releases of debian / ubuntu / redhat. |
If
HEADis pointing to a gpg-signed commit, the result of the previousGET_CURRENT_COMMIT_TIMESTAMPexpression will include GPG info, which in turn will end up in.update.timestampfor the current project. This is especially relevant if the user has configuredgit config log.showSignature true.Fix this behavior by ignoring irrelevant GPG signed status with
--no-show-signature.