diff --git a/build.rs b/build.rs index 1020514..b6d7130 100644 --- a/build.rs +++ b/build.rs @@ -1,8 +1,10 @@ use std::error::Error; -use vergen::{vergen, Config}; +use vergen::{vergen, Config, ShaKind}; fn main() -> Result<(), Box> { - vergen(Config::default())?; + let mut config = Config::default(); + *config.git_mut().sha_kind_mut() = ShaKind::Short; + vergen(config)?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index ead39a8..29d5ea0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -244,8 +244,8 @@ fn print_preamble_and_warnings(args: &CliArgs) -> Result<(), Box> { " ", env!("CARGO_PKG_VERSION"), " (", - env!("VERGEN_GIT_SHA"), - ") ", + env!("VERGEN_GIT_SHA_SHORT"), + ")", " Copyright (C) 2021 ", env!("CARGO_PKG_AUTHORS"), "\n\n",