Struct build_info_common::GitInfo
source · pub struct GitInfo {
pub commit_id: String,
pub commit_short_id: String,
pub commit_timestamp: DateTime<Utc>,
pub dirty: bool,
pub branch: Option<String>,
pub tags: Vec<String>,
}Expand description
Information about a git repository
If a git repository is detected (and, thereby, this information included), the build script will be rerun whenever the currently checked out commit changes.
Fields§
§commit_id: StringFull commit hash for the currently checked out commit
commit_short_id: StringShort commit hash for the currently checked out commit
The length of this string depends on the effective value of the git configuration variable core.abbrev, and is
extended to the minimum length required for the id to be unique (at the time it was computed).
commit_timestamp: DateTime<Utc>Timestamp of the currently checked out commit
dirty: booltrue iff the repository had uncommitted changes when building the project.
branch: Option<String>Names the branch that is currently checked out, if any
All tags that point to the current commit (e.g., ["v0.0.10", "sample@v0.0.10"])
Trait Implementations§
source§impl Ord for GitInfo
impl Ord for GitInfo
source§impl PartialEq<GitInfo> for GitInfo
impl PartialEq<GitInfo> for GitInfo
source§impl PartialOrd<GitInfo> for GitInfo
impl PartialOrd<GitInfo> for GitInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more