pub struct GitInfo {
pub git_root: PathBuf,
pub git_hash: String,
pub git_shorthash: String,
pub git_date: String,
pub git_datetime: String,
}Expand description
Git repository information
Fields§
§git_root: PathBufThe absolute path to the git repository’s data folder.
In a normal repository, this is .git, not the index or working directory.
git_hash: StringThe full hash of the current commit.
Note that this makes no effore to handle dirty working directories, so it may not be representative of the current state of the code.
git_shorthash: StringThe short hash of the current commit.
This is read from git and not truncated manually, so it may be longer than 7 characters.
git_date: StringThe date of the current commit, in the format YYYY-MM-DD, at UTC.
git_datetime: StringThe datetime of the current commit, in the format YYYY-MM-DD HH:MM:SS, at UTC.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GitInfo
impl RefUnwindSafe for GitInfo
impl Send for GitInfo
impl Sync for GitInfo
impl Unpin for GitInfo
impl UnwindSafe for GitInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more