From fa123bbfeeb9a7456e8ddbe86795249192375c32 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 1f8e9ce03..4a4439dce 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 current 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 d3f829128..db8e0dd54 100644 --- a/docs/revsets.md +++ b/docs/revsets.md @@ -227,6 +227,12 @@ Show the parent(s) of the working-copy commit (like `git log -1 HEAD`): jj log -r @- ``` +Show all ancestors of the working copy (like plain `git log`) + +``` +jj log -r ::@ +``` + Show commits not on any remote branch: ``` @@ -239,12 +245,6 @@ Show commits not on `origin` (if you have other remotes like `fork`): jj log -r 'remote_branches(remote=origin)..' ``` -Show all ancestors of the working copy (almost like plain `git log`) - -``` -jj log -r ::@ -``` - Show the initial commits in the repo (the ones Git calls "root commits"): ```