mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
If a cherry-pick or revert of several commits stops before git starts to apply one of them, git doesn't write CHERRY_PICK_HEAD or REVERT_HEAD. It only leaves the todos behind in .git/sequencer. Look at the first todo there, like git status does. If it is a "pick" or "revert", consider a cherry-pick or revert to be in progress. Once we show such an operation, two more things need care. The same state occurs if the user resolves a conflict and commits the result themselves. Git tells the two cases apart by whether HEAD has moved since it last tried to apply a commit, so do the same. Mark the commit that git stopped at as conflicted only if CHERRY_PICK_HEAD or REVERT_HEAD exists, and don't show it as pending if the user has committed it. Also, "git cherry-pick --continue" skips the commit that git stopped at, even if git never applied it. Before continuing in that case, put a copy of its todo in front of it, so that git skips the copy instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>