Skip to main content

get_git_commit

Function get_git_commit 

Source
pub fn get_git_commit(directory: &Path) -> Option<String>
Expand description

Get the current git commit hash of the project directory.

Returns Some(commit_hash) if the directory is a git repository with a valid HEAD, otherwise returns None.

ยงArguments

  • directory - Path to the project directory