Skip to content

Commit

Permalink
log: add some documentation
Browse files Browse the repository at this point in the history
The `jj log` command had basically no documentation. Let's at least
start adding some.
  • Loading branch information
martinvonz committed Mar 8, 2024
1 parent 98baaf2 commit 8c8f23f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions cli/src/commands/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@ use crate::diff_util::{self, DiffFormatArgs};
use crate::graphlog::{get_graphlog, Edge};
use crate::ui::Ui;

/// Show commit history
/// Show revision history
///
/// Renders a graphical view of the project's history with, ordered with
/// children before parents. By default, the output only includes mutable
/// revisions, along with some additional revisions for context.
#[derive(clap::Args, Clone, Debug)]
pub(crate) struct LogArgs {
/// Which revisions to show. Defaults to the `revsets.log` setting, or
/// `@ | ancestors(immutable_heads().., 2) | trunk()` if it is not set.
#[arg(long, short)]
revisions: Vec<RevisionArg>,
/// Show commits modifying the given paths
/// Show revisions modifying the given paths
#[arg(value_hint = clap::ValueHint::AnyPath)]
paths: Vec<String>,
/// Show revisions in the opposite order (older revisions first)
Expand Down
8 changes: 5 additions & 3 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ To get started, see the tutorial at https://github.com/martinvonz/jj/blob/main/d
* `git`Commands for working with the underlying Git repo
* `init`Create a new repo in the given directory
* `interdiff`Compare the changes of two commits
* `log`Show commit history
* `log`Show revision history
* `move`Move changes from one revision into another
* `new`Create a new, empty change and (by default) edit it in the working copy
* `next`Move the current working copy commit to the next child revision in the
Expand Down Expand Up @@ -1010,13 +1010,15 @@ This excludes changes from other commits by temporarily rebasing `--from` onto `
## `jj log`
Show commit history
Show revision history
Renders a graphical view of the project's history with, ordered with children before parents. By default, the output only includes mutable revisions, along with some additional revisions for context.
**Usage:** `jj log [OPTIONS] [PATHS]...`
###### **Arguments:**
* `<PATHS>` — Show commits modifying the given paths
* `<PATHS>` — Show revisions modifying the given paths
###### **Options:**
Expand Down

0 comments on commit 8c8f23f

Please sign in to comment.