mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-27 22:38:09 +02:00
allow entering and returning from submodule
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
// "strings"
|
||||
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -159,6 +160,17 @@ func (gui *Gui) enterFile(forceSecondaryFocused bool, selectedLineIdx int) error
|
||||
return nil
|
||||
}
|
||||
|
||||
submoduleConfigs := gui.State.SubmoduleConfigs
|
||||
if file.IsSubmodule(submoduleConfigs) {
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gui.State.RepoPathStack = append(gui.State.RepoPathStack, wd)
|
||||
submoduleConfig := file.SubmoduleConfig(submoduleConfigs)
|
||||
return gui.dispatchSwitchToRepo(submoduleConfig.Path)
|
||||
}
|
||||
|
||||
if file.HasInlineMergeConflicts {
|
||||
return gui.handleSwitchToMerge()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user