mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Optimistically render unstaging a dirty submodule
This map only feeds the optimistic rendering that makes staging feel instant; it doesn't affect the eventual status, which git reports after the refresh. The "MM" entry can never be reached for a regular file: a file at "MM" has stageable unstaged changes, so pressing space stages it rather than unstaging, and the unstage path is where this map is used. The only thing that reaches the unstage path at "MM" is a submodule whose commit is staged on top of dirty content, so this entry exists purely to update that submodule instantly instead of waiting for the next git status. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c46c874442
commit
8b5cfb0425
|
|
@ -387,6 +387,9 @@ var unstageStatusMap = map[string]string{
|
|||
"A ": "??",
|
||||
"M ": " M",
|
||||
"D ": " D",
|
||||
// A submodule with both a staged commit and unstageable dirty content; the
|
||||
// staged commit gets unstaged, the dirty content stays.
|
||||
"MM": " M",
|
||||
}
|
||||
|
||||
func (self *FilesController) optimisticStage(file *models.File) bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue