cli: move revsets.log default to config file

This commit is contained in:
Martin von Zweigbergk 2024-05-05 07:23:51 -07:00 committed by Martin von Zweigbergk
parent f958957f9e
commit 3dab92d2e9
2 changed files with 4 additions and 3 deletions

View file

@ -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(

View file

@ -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 {