1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

allow scoped mode where the commits/reflog/stash panels are scoped to a file

WIP

restrict certain actions in scoped mode

WIP
This commit is contained in:
Jesse Duffield
2020-03-28 16:28:35 +11:00
parent 2756b82f57
commit 624ae45ebb
17 changed files with 308 additions and 38 deletions

View File

@@ -37,7 +37,7 @@ func (gui *Gui) handleReflogCommitSelect(g *gocui.Gui, v *gocui.View) error {
v.FocusPoint(0, gui.State.Panels.ReflogCommits.SelectedLine)
cmd := gui.OSCommand.ExecutableFromString(
gui.GitCommand.ShowCmdStr(commit.Sha),
gui.GitCommand.ShowCmdStr(commit.Sha, gui.State.LogScope),
)
if err := gui.newPtyTask("main", cmd); err != nil {
gui.Log.Error(err)
@@ -52,7 +52,7 @@ func (gui *Gui) refreshReflogCommits() error {
lastReflogCommit = gui.State.ReflogCommits[0]
}
commits, onlyObtainedNewReflogCommits, err := gui.GitCommand.GetReflogCommits(lastReflogCommit)
commits, onlyObtainedNewReflogCommits, err := gui.GitCommand.GetReflogCommits(lastReflogCommit, gui.State.LogScope)
if err != nil {
return gui.surfaceError(err)
}