Skip to main content

get_git_head_revision

Function get_git_head_revision 

Source
pub fn get_git_head_revision(workspace_path: &Path) -> Option<String>
Expand description

Get the current git HEAD revision.

ยงBlocking

Spawns a git rev-parse HEAD subprocess and blocks until it exits. When called from an async context, wrap in tokio::task::spawn_blocking to avoid stalling the runtime.