Skip to main content

get_head_commit

Function get_head_commit 

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

Get the full commit hash of HEAD.

ยงReturns

  • Ok(String) - The full 40-character commit hash
  • Err - If the git command fails (e.g., not in a git repo)