Skip to main content

commit_index

Function commit_index 

Source
pub fn commit_index() -> Result<CommitIndex, IndexLookupError>
Expand description

The index git commit is sealing, as an absolute path: git’s own GIT_INDEX_FILE when it handed the hook one (the temporary index of commit -a or commit <paths>), else the repository’s index. Relative paths are resolved against this process’s directory, where git ran the hook. Paths are kept as bytes, so a non-UTF-8 one survives. The error names the step that failed, with git’s own reason.