mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-08 05:39:20 +00:00
cli: rewrite "x | x-" in default log revset as "ancestors(x, 2)"
This commit is contained in:
parent
5fc71018d6
commit
8b825796ff
3 changed files with 4 additions and 8 deletions
|
@ -354,9 +354,8 @@ struct StatusArgs {}
|
|||
/// Show commit history
|
||||
#[derive(clap::Args, Clone, Debug)]
|
||||
struct LogArgs {
|
||||
/// Which revisions to show. Defaults to the `revsets.log` setting,
|
||||
/// or `@ | (remote_branches() | tags()).. | ((remote_branches() |
|
||||
/// tags())..)-` if it is not set.
|
||||
/// Which revisions to show. Defaults to the `revsets.log` setting, or
|
||||
/// `@ | ancestors((remote_branches() | tags()).., 2)` if it is not set.
|
||||
#[arg(long, short)]
|
||||
revisions: Vec<RevisionArg>,
|
||||
/// Show commits modifying the given paths
|
||||
|
|
|
@ -294,7 +294,7 @@
|
|||
"log": {
|
||||
"type": "string",
|
||||
"description": "Default set of revisions to show when no explicit revset is given for jj log and similar commands",
|
||||
"default": "@ | (remote_branches() | tags()).. | ((remote_branches() | tags())..)-"
|
||||
"default": "@ | ancestors((remote_branches() | tags()).., 2)"
|
||||
},
|
||||
"short-prefixes": {
|
||||
"type": "string",
|
||||
|
|
|
@ -159,10 +159,7 @@ impl UserSettings {
|
|||
// For compatibility with old config files (<0.8.0)
|
||||
self.config
|
||||
.get_string("ui.default-revset")
|
||||
.unwrap_or_else(|_| {
|
||||
"@ | (remote_branches() | tags()).. | ((remote_branches() | tags())..)-"
|
||||
.to_string()
|
||||
})
|
||||
.unwrap_or_else(|_| "@ | ancestors((remote_branches() | tags()).., 2)".to_string())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue