1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

only show rebasey commands on a local commit when patch building

This commit is contained in:
Jesse Duffield
2020-08-21 20:40:20 +10:00
parent e6a1bd6566
commit 1fd0f31682
2 changed files with 29 additions and 10 deletions

View File

@ -1,6 +1,8 @@
package gui
import (
"strings"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/utils"
)
@ -119,3 +121,11 @@ func (gui *Gui) secondaryPatchPanelUpdateOpts() *viewUpdateOpts {
return nil
}
func (gui *Gui) handleCopyPatchToClipboard() error {
// TODO: test that this works
return gui.OSCommand.CopyToClipboard(
strings.Join(gui.GitCommand.PatchManager.RenderEachFilePatch(true), "\n"),
)
}