Struct build_info::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: String
Full commit hash for the currently checked out commit
commit_short_id: String
Short 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: bool
true
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<'de> Deserialize<'de> for GitInfo
impl<'de> Deserialize<'de> for GitInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<GitInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<GitInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Ord for GitInfo
impl Ord for GitInfo
source§impl PartialEq for GitInfo
impl PartialEq for GitInfo
source§impl PartialOrd for GitInfo
impl PartialOrd 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