From d77ca1526a63ceeea6cdfd24aadef5bb420bab75 Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 8 Nov 2024 21:58:46 +0100 Subject: [PATCH] cli: reference config settings for 'jj log -T' and 'jj git push -c' --- cli/src/commands/git/push.rs | 3 +++ cli/src/commands/log.rs | 7 ++++++- cli/tests/cli-reference@.md.snap | 8 +++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/git/push.rs b/cli/src/commands/git/push.rs index 05e406df1..127ccf368 100644 --- a/cli/src/commands/git/push.rs +++ b/cli/src/commands/git/push.rs @@ -114,6 +114,9 @@ pub struct GitPushArgs { revisions: Vec, /// Push this commit by creating a bookmark based on its change ID (can be /// repeated) + /// + /// Use the `git.push-bookmark-prefix` setting to change the prefix for + /// generated names. #[arg(long, short)] change: Vec, /// Only display what will change on the remote diff --git a/cli/src/commands/log.rs b/cli/src/commands/log.rs index 060dbb811..e3a04c323 100644 --- a/cli/src/commands/log.rs +++ b/cli/src/commands/log.rs @@ -77,7 +77,12 @@ pub(crate) struct LogArgs { no_graph: bool, /// Render each revision using the given template /// - /// For the syntax, see https://martinvonz.github.io/jj/latest/templates/ + /// Run `jj log -T` to list the built-in templates. + /// + /// You can also specify arbitrary template expressions. For the syntax, + /// see https://martinvonz.github.io/jj/latest/templates/. + /// + /// If not specified, this defaults to the `templates.log` setting. #[arg(long, short = 'T')] template: Option, /// Show patch diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 7b354cda2..1cdbef553 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1133,6 +1133,8 @@ Before the command actually moves, creates, or deletes a remote bookmark, it mak * `--allow-private` — Allow pushing commits that are private * `-r`, `--revisions ` — Push bookmarks pointing to these commits (can be repeated) * `-c`, `--change ` — Push this commit by creating a bookmark based on its change ID (can be repeated) + + Use the `git.push-bookmark-prefix` setting to change the prefix for generated names. * `--dry-run` — Only display what will change on the remote @@ -1312,7 +1314,11 @@ Spans of revisions that are not included in the graph per `--revisions` are rend * `--no-graph` — Don't show the graph, show a flat list of revisions * `-T`, `--template