From a695c536338ee582cddce39f91525c6d13938554 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Wed, 4 Sep 2024 01:51:21 +0200 Subject: [PATCH] init: Prefer `ref` instead of `rev-or-ref` --- src/update.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/update.rs b/src/update.rs index 7429ac5..06a5213 100644 --- a/src/update.rs +++ b/src/update.rs @@ -113,8 +113,8 @@ impl Updater { maybe_version = normalized_version.to_string(); } - // If we init the version specifier we don't care if before there was already a - // working version. + // If we init the version specifier we don't care if there was already a + // correct semver specified, we automatically pin to the latest semver. if !init { let _version = match semver::Version::parse(&maybe_version) { Ok(v) => v, @@ -134,7 +134,7 @@ impl Updater { tags.sort(); if let Some(change) = tags.get_latest_tag() { - if *is_params { + if *is_params || init { let _ = parsed.params.r#ref(Some(change.to_string())); } else { let _ = parsed.r#type.ref_or_rev(Some(change.to_string()));