Short hashes are 7 long

This commit is contained in:
Félix Saparelli 2024-01-20 17:31:38 +13:00
parent de339a4e15
commit e2d1f83d1c
No known key found for this signature in database
4 changed files with 4 additions and 3 deletions

View File

@ -78,6 +78,7 @@ checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
name = "bosion"
version = "1.0.2"
dependencies = [
"flate2",
"gix-features",
"gix-hash",
"gix-pack",

View File

@ -52,7 +52,7 @@ dependencies = [
[[package]]
name = "bosion"
version = "1.0.1"
version = "1.0.2"
dependencies = [
"time",
]

View File

@ -52,7 +52,7 @@ dependencies = [
[[package]]
name = "bosion"
version = "1.0.1"
version = "1.0.2"
dependencies = [
"time",
]

View File

@ -163,7 +163,7 @@ impl GitInfo {
Ok(Self {
git_root: repo.canonicalize().err_string()?,
git_hash: hash.to_hex().to_string(),
git_shorthash: hash.to_hex_with_len(8).to_string(),
git_shorthash: hash.to_hex_with_len(7).to_string(),
git_date: timestamp.format(DATE_FORMAT).err_string()?,
git_datetime: timestamp.format(DATETIME_FORMAT).err_string()?,
})