rerun_if_git_commit_or_branch_changed

Function rerun_if_git_commit_or_branch_changed 

Source
pub fn rerun_if_git_commit_or_branch_changed() -> Result<(), String>
Expand description

Tells Cargo to re-run the build if the git commit or branch changed.

NOTE: By default, Cargo re-runs build.rs when any file in the directory changes. But if you use any rerun-if-changed rule, then it removes that default and uses only the rules you specify. Only call this function if you are already using rerun-if-changed rules. See cargo::rerun-if-changed=PATH.

ยงErrors

Returns an error if it fails to execute the git command.