You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make it easier to review the changes introduced by a commit #335
Reviewing the changes introduced by the latest commit currently requires Git revision syntax:
revdiff 'HEAD^' HEAD
or:
revdiff 'HEAD^!'
It would be helpful to have a more discoverable and memorable way to review a single commit, especially HEAD.
One possible approach would be a flag such as --show, but that is only an example. Any interface that makes this common operation easier and preserves the existing meaning of revdiff HEAD would address the use case.
revdiff HEAD~1 HEAD already does this, and it works the same on git, hg and jj.
the single-ref form compares against the working tree, so revdiff HEAD~1 picks up uncommitted changes too. On a clean tree it looks the same as the commit, which is why it seems to work. Two positional refs get joined into a range internally, so HEAD~1 HEAD is just the one commit.
revdiff is primarily intended to be launched by an agent rather than typed by hand, and the plugin skills describe the two-ref form and only fall back to a bare HEAD~1 after confirming a clean tree. So the automatic path already avoids this.
not planning to support HEAD^! though. It gives the right thing for an ordinary commit but not in general: on a merge it produces an empty diff, on a root commit it falls back to comparing against the working tree, and the commit list in the info popup errors out because a single ref gets rewritten to HEAD^!..HEAD for the log query. HEAD~1 HEAD is the portable spelling.
Activity
umputun commentedon Sep 1, 2026
revdiff HEAD~1 HEADalready does this, and it works the same on git, hg and jj.the single-ref form compares against the working tree, so
revdiff HEAD~1picks up uncommitted changes too. On a clean tree it looks the same as the commit, which is why it seems to work. Two positional refs get joined into a range internally, soHEAD~1 HEADis just the one commit.revdiff is primarily intended to be launched by an agent rather than typed by hand, and the plugin skills describe the two-ref form and only fall back to a bare
HEAD~1after confirming a clean tree. So the automatic path already avoids this.not planning to support
HEAD^!though. It gives the right thing for an ordinary commit but not in general: on a merge it produces an empty diff, on a root commit it falls back to comparing against the working tree, and the commit list in the info popup errors out because a single ref gets rewritten toHEAD^!..HEADfor the log query.HEAD~1 HEADis the portable spelling.raine commentedon Sep 1, 2026
No worries. Forked this and made it work better for me
docs: add backlog item for jj HEAD^ ref mistranslation