From a6206d46c84de1ec95990162c748c7d6882dea8e Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Wed, 31 Jan 2024 12:32:10 -0800 Subject: [PATCH] docs: emphasize and clarify log revsets relevant to people coming from git I couldn't come up with a Git analogue of `jj log`, but I think it's OK leaving it as a TODO makes the point. Perhaps somebody can figure it out. Also, all the correspondences are not completely precise, so I didn't emphasize it every single time. --- docs/git-comparison.md | 15 ++++++++++----- docs/revsets.md | 12 ++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/git-comparison.md b/docs/git-comparison.md index 1f8e9ce037f..d15947dc5e6 100644 --- a/docs/git-comparison.md +++ b/docs/git-comparison.md @@ -181,14 +181,19 @@ parent. git commit -a - See log of commits - jj log + See log of ancestors of the commit + jj log -r ::@ git log --oneline --graph --decorate - Show log of ancestors of the current commit only, including all ancestors, not just stopping at immutable commits - jj log -r ::@ - git log + See log of all reachable commits + jj log -r 'all()' or jj log -r :: + git log --oneline --graph --decorate --branches + + + Show log of commits not on the main branch + jj log + (TODO) Search among files versioned in the repository diff --git a/docs/revsets.md b/docs/revsets.md index d3f829128e9..db8e0dd546a 100644 --- a/docs/revsets.md +++ b/docs/revsets.md @@ -227,22 +227,22 @@ Show the parent(s) of the working-copy commit (like `git log -1 HEAD`): jj log -r @- ``` -Show commits not on any remote branch: +Show all ancestors of the working copy (like plain `git log`) ``` -jj log -r 'remote_branches()..' +jj log -r ::@ ``` -Show commits not on `origin` (if you have other remotes like `fork`): +Show commits not on any remote branch: ``` -jj log -r 'remote_branches(remote=origin)..' +jj log -r 'remote_branches()..' ``` -Show all ancestors of the working copy (almost like plain `git log`) +Show commits not on `origin` (if you have other remotes like `fork`): ``` -jj log -r ::@ +jj log -r 'remote_branches(remote=origin)..' ``` Show the initial commits in the repo (the ones Git calls "root commits"):