Sign in

    PaiGack/moon_shadow/gitinfo does not have a README file

    GitInfo

    pub(all) struct GitInfo {
    available : Bool
    branch : String
    tag : String
    describe : String
    commit : String
    short_commit : String
    commit_date : String
    author : String
    email : String
    dirty : Bool
    ahead : Int
    behind : Int
    } derive(Eq,
    Debug
    )

    A snapshot of the git repository that was checked out when this module was built, rendered into the artifact at build time.

    Filled in by gen, never by the running program: the machine that runs the software has no .git, may not have git, and its cwd is none of your business.

    GitInfo::commit_version

    fn GitInfo::commit_version(self : GitInfo, short? : Bool) -> String

    <commit>[-dirty], or the short form when short is set.

    GitInfo::describe_version

    fn GitInfo::describe_version(self : GitInfo) -> String

    name[-dirty]: the branch name, the tag, or the describe output, whichever is the most specific thing known about HEAD.

    GitInfo::equal

    #deprecated("`GitInfo::equal` is deprecated, use `Eq::equal` instead.")
    fn GitInfo::equal(GitInfo, GitInfo) -> Bool

    GitInfo::is_dirty

    fn GitInfo::is_dirty(self : GitInfo) -> Bool

    Whether the value carries a commit worth printing.

    GitInfo::none

    fn GitInfo::none() -> GitInfo

    The "no git here" value: available = false, everything else empty.

    GitInfo::not_equal

    #deprecated("`GitInfo::not_equal` is deprecated, use `Eq::not_equal` instead.")
    fn GitInfo::not_equal(x : GitInfo, y : GitInfo) -> Bool

    GitInfo::to_repr

    #deprecated("`GitInfo::to_repr` is deprecated, use `@moonbitlang/core/debug.Debug::to_repr` instead.")
    fn GitInfo::to_repr(GitInfo) ->
    Repr

    GitInfo::to_version_string

    fn GitInfo::to_version_string(self : GitInfo) -> String

    available=false becomes unavailable instead of an empty string, so a --version line does not end in dangling separators.

    RawGitInfo

    pub(all) struct RawGitInfo {
    branch : String
    tag : String
    describe : String
    commit : String
    short_commit : String
    commit_date : String
    author : String
    email : String
    status : String
    upstream_count : String
    }

    Raw output of the git commands, as gen captured them.

    Split from GitInfo so the "what does this string mean" part can be tested without a git repository: gen runs the commands, gitinfo only reads.

    RawGitInfo::empty

    fn RawGitInfo::empty() -> RawGitInfo

    RawGitInfo::to_git_info

    fn RawGitInfo::to_git_info(self : RawGitInfo) -> GitInfo

    Interpret the captured output. available is decided by the caller: only it knows whether git actually ran.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io