struct

Hwaro::Models::GitInfo

Inherits Struct < Value < Object

Commit metadata for one content file, collected once per build by Core::Build::GitInfo when [git] enabled = true.

hash/author_*/lastmod describe the file's LATEST non-merge commit (the first one git log lists); first_commit is the earliest author date across every commit that touched the path. Renames are not followed, so a renamed file's history restarts at the rename commit. Times keep the author's UTC offset (%aI), matching how front-matter dates are treated as local wall-clock values.

Constructors

new(hash : String, lastmod : Time, first_commit : Time, author_name : String, author_email : String)
Source

Instance methods

author_email
author_name
clone
Source
copy_with(hash _hash = @hash, lastmod _lastmod = @lastmod, first_commit _first_commit = @first_commit, author_name _author_name = @author_name, author_email _author_email = @author_email)
Source
first_commit
hash

Generates an UInt64 hash value for this object.

This method must have the property that a == b implies a.hash == b.hash.

The hash value is used along with == by the Hash class to determine if two objects reference the same hash key.

Subclasses must not override this method. Instead, they must define hash(hasher), though usually the macro def_hash can be used to generate this method.

lastmod
short_hash

Abbreviated commit id (7 chars, git's default --short width).

Source