Repository navigation
When a "git am" in progress, let the user continue, skip or abort it - #6196
Merged
Merged
Conversation
The texts for aborting or continuing a merge, rebase, cherry-pick or revert insert the git command name into the sentence, as in "Abort the rebase". We are going to support "git am" next, and "Abort the am" makes no sense. Give each operation a translated phrase like "the rebase" instead, and use it as a placeholder in these texts. Rename the texts too. The existing translations still use %s, and this way lazygit ignores them until they are updated. This changes the wording of the abort confirmation slightly, from "Abort rebase" to "Abort the rebase", and from "abort the current rebase" to "abort the rebase". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Users can copy commits from one repo to another with "git format-patch" and "git am", for example with custom commands. If "git am" stopped with a conflict, lazygit showed this as a rebase, because git am uses the rebase-apply directory too. The rebase options in the m menu didn't work either; git refuses to run "git rebase --continue" during an am. Recognize an am by the rebase-apply/applying file, and call this state "applying patches". The m menu then offers "git am --continue", "--abort" and "--skip". If "git am --continue" finds nothing to commit, it says "No changes - did you forget to use 'git add'?". Unlike for a rebase, don't skip the patch in that case. Without --3way, git am leaves the files alone if a patch doesn't apply, and skipping would lose the patch. If a lock error stops "git am --continue" or "--skip" after it has moved on to the next patch, don't run it again; this could skip that patch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All callers turned the result of isCherryPickingOrReverting into the same disabled reason. The next commit adds a second reason for "git am", so return the reason itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show them in the commits panel under a "Pending patches" header, like the todos of a rebase or cherry-pick. The patches usually come from another repository, so we can't look up their commits. Instead, take the subject, author and date from the patch files in .git/rebase-apply, and show the patch itself in the main view. Git has no way of editing these todos, so disable the actions that would edit them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Users can copy commits from one repo to another with "git format-patch" and "git am", for example with custom commands. If "git am" stopped with a conflict, lazygit showed this as a rebase, because git am uses the rebase-apply directory too. The rebase options in the m menu didn't work either; git refuses to run "git rebase --continue" during an am.
Recognize an am by the rebase-apply/applying file, and call this state "applying patches". The
mmenu then offers "git am --continue", "--abort" and "--skip".