pub fn commit_time(sha: &str) -> Result<i64>Expand description
When sha was committed, as seconds since the epoch, read from the raw
commit object.
Not git show --format=%ct, for two reasons. With log.showSignature
set, show writes a signature’s verification text onto stdout ahead of
the format. And a commit dated before 1970, which only an import or a
hand-written object can produce, has a negative timestamp that %ct
prints as nothing at all. cat-file prints the object as stored, so the
committer line says exactly what the commit says.