diff --git a/cli/src/config/revsets.toml b/cli/src/config/revsets.toml index 2570d324d5..f37d649d7e 100644 --- a/cli/src/config/revsets.toml +++ b/cli/src/config/revsets.toml @@ -1,6 +1,9 @@ # NOTE: ensure you update docs/revsets.md with documentation when # adding/updating any of these aliases +[revsets] +log = "@ | ancestors(immutable_heads().., 2) | trunk()" + [revset-aliases] 'trunk()' = ''' latest( diff --git a/lib/src/settings.rs b/lib/src/settings.rs index f9466807da..8497ced2a6 100644 --- a/lib/src/settings.rs +++ b/lib/src/settings.rs @@ -205,9 +205,7 @@ impl UserSettings { } pub fn default_revset(&self) -> String { - self.config - .get_string("revsets.log") - .unwrap_or_else(|_| "@ | ancestors(immutable_heads().., 2) | trunk()".to_string()) + self.config.get_string("revsets.log").unwrap_or_default() } pub fn signature(&self) -> Signature {