Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Fails to get timestamp from git if signature verification is enabled #104

Open
teythoon opened this issue Jun 25, 2024 · 0 comments
Open

Comments

@teythoon
Copy link

On my system, git is configured to verify OpenPGP signatures when listing commits. This makes jekyll-last-modified-at fail to parse the modification time, returning 0, or 1970 as a result. Fortunately, the fix is simple, add --no-show-signature:

$ git config --get log.showsignature
true
$ git log -n 1 --format="%ct" -- _software/01-software.md | cat
gpg: Signature made Tue Jun 25 16:33:02 2024 +02:00
gpg:                using EDDSA key D1FE45FB978F6B65C4C0B9AA686F55B4AB2B3386
gpg: Good signature from "Justus Winter (Code Signing Key) <[email protected]>" [full]
gpg:                     "Justus Winter (Code Signing Key) <[email protected]>"
1719325976
$ git log -n 1 --no-show-signature --format="%ct" -- _software/01-software.md | cat
1719325976

Sticking that in last_modified_at_unix fixes the problem for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant