mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-31 23:19:40 +02:00
Fix out-of-date comment
The behavior described in the comment is no longer what we do, it was changed in ae66f720f5; we now always reuse the state.
This commit is contained in:
parent
51eb6d7c7d
commit
f45ecbc19a
@ -342,15 +342,8 @@ func (gui *Gui) onNewRepo(startArgs appTypes.StartArgs, contextKey types.Context
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// resetState determines if we pull the repo state from our repo state map or
|
// resetState reuses the repo state from our repo state map, if the repo was
|
||||||
// just re-initialize it. For now we're only re-using state when we're going
|
// open before; otherwise it creates a new one.
|
||||||
// in and out of submodules, for the sake of having the cursor back on the submodule
|
|
||||||
// when we return.
|
|
||||||
//
|
|
||||||
// I tried out always reverting to the repo's original state but found that in fact
|
|
||||||
// it gets a bit confusing to land back in the status panel when visiting a repo
|
|
||||||
// you've already switched from. There's no doubt some easy way to make the UX
|
|
||||||
// optimal for all cases but I'm too lazy to think about what that is right now
|
|
||||||
func (gui *Gui) resetState(startArgs appTypes.StartArgs) types.Context {
|
func (gui *Gui) resetState(startArgs appTypes.StartArgs) types.Context {
|
||||||
worktreePath := gui.git.RepoPaths.WorktreePath()
|
worktreePath := gui.git.RepoPaths.WorktreePath()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user