Skip to main content

parse_commit

Function parse_commit 

Source
pub(crate) fn parse_commit(output: &str) -> Option<String>
Expand description

Extract the commit sha from a --version banner.

llama-server renders it parenthesised after the build number — version: 1 (69bf643). Read as the first parenthesised run of hex digits so a banner carrying other parenthesised text does not yield a false sha.