Struct vergen_git2::Git2Builder
source · pub struct Git2Builder { /* private fields */ }Expand description
Builder for Git2.
Implementations§
source§impl Git2Builder
impl Git2Builder
sourcepub fn repo_path(&mut self, value: Option<PathBuf>) -> &mut Self
pub fn repo_path(&mut self, value: Option<PathBuf>) -> &mut Self
An optional path to a repository.
sourcepub fn branch(&mut self, value: bool) -> &mut Self
pub fn branch(&mut self, value: bool) -> &mut Self
Emit the current git branch
cargo:rustc-env=VERGEN_GIT_BRANCH=<BRANCH_NAME>
Emit the author email of the most recent commit
cargo:rustc-env=VERGEN_GIT_COMMIT_AUTHOR_EMAIL=<AUTHOR_EMAIL>
Emit the author name of the most recent commit
cargo:rustc-env=VERGEN_GIT_COMMIT_AUTHOR_NAME=<AUTHOR_NAME>
sourcepub fn commit_count(&mut self, value: bool) -> &mut Self
pub fn commit_count(&mut self, value: bool) -> &mut Self
Emit the total commit count to HEAD
cargo:rustc-env=VERGEN_GIT_COMMIT_COUNT=<COUNT>
sourcepub fn commit_message(&mut self, value: bool) -> &mut Self
pub fn commit_message(&mut self, value: bool) -> &mut Self
Emit the commit message of the latest commit
cargo:rustc-env=VERGEN_GIT_COMMIT_MESSAGE=<MESSAGE>
sourcepub fn commit_date(&mut self, value: bool) -> &mut Self
pub fn commit_date(&mut self, value: bool) -> &mut Self
Emit the commit date of the latest commit
cargo:rustc-env=VERGEN_GIT_COMMIT_DATE=<YYYY-MM-DD>
sourcepub fn commit_timestamp(&mut self, value: bool) -> &mut Self
pub fn commit_timestamp(&mut self, value: bool) -> &mut Self
Emit the commit timestamp of the latest commit
cargo:rustc-env=VERGEN_GIT_COMMIT_TIMESTAMP=<YYYY-MM-DDThh:mm:ssZ>
source§impl Git2Builder
impl Git2Builder
sourcepub fn all(&mut self) -> &mut Self
pub fn all(&mut self) -> &mut Self
Convenience method to setup the Git2Builder with all of the VERGEN_GIT_* instructions on
sourcepub fn describe(
&mut self,
tags: bool,
dirty: bool,
matches: Option<&'static str>
) -> &mut Self
pub fn describe( &mut self, tags: bool, dirty: bool, matches: Option<&'static str> ) -> &mut Self
Emit the describe output
cargo:rustc-env=VERGEN_GIT_DESCRIBE=<DESCRIBE>
Optionally, add the dirty or tags flag to describe.
See git describe for more details
sourcepub fn dirty(&mut self, include_untracked: bool) -> &mut Self
pub fn dirty(&mut self, include_untracked: bool) -> &mut Self
Emit the dirty state of the git repository
cargo:rustc-env=VERGEN_GIT_DIRTY=(true|false)
Optionally, include untracked files when determining the dirty status of the repository.
sourcepub fn sha(&mut self, short: bool) -> &mut Self
pub fn sha(&mut self, short: bool) -> &mut Self
Emit the SHA of the latest commit
cargo:rustc-env=VERGEN_GIT_SHA=<SHA>
Optionally, add the short flag to rev-parse.
See git rev-parse for more details.
Trait Implementations§
source§impl Clone for Git2Builder
impl Clone for Git2Builder
source§fn clone(&self) -> Git2Builder
fn clone(&self) -> Git2Builder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more