Repository navigation
Conversation
R in the log picks up the selected commit and reuses the rebase destination picker (onto/after/before) to run jj revert. The destination defaults to the working copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R in the log picks up the selected commit and reuses the rebase destination picker (onto/after/before) to run jj revert. The destination defaults to the working copy.
Summary
Adds
jj revertto gojo: pressRon a commit in the log, choose where the reverse should go (onto / after / before a destination), and press ⏎.Why
gojo had no way to revert a commit.
jj revertneeds a destination and a placement (--onto/--insert-after/--insert-before), which are the same choices rebase mode already offers, so revert reuses that picker instead of adding a new mode.Changes
Runner.Revertrunsjj revert -r <src> <placement> <dest>; it supports the same retry-with-extra-flags path as rebase.revertlog action bound toR, remappable aslog.revertin[keymap].[revert], the source is marked "● reverting", and the-r/-sscope toggle is disabled.execRebasenow has one run path shared by rebase and revert.R/ revert appears in the help view, the log right-click menu and the shortcut bar.Checklist
go build ./...passesgo vet ./...passesgo test ./...passesTestRevertModeFlow,TestRevertDefaultDestination, keymap resolution)