File tree Expand file tree Collapse file tree 5 files changed +192
-300
lines changed Expand file tree Collapse file tree 5 files changed +192
-300
lines changed Original file line number Diff line number Diff line change @@ -5,34 +5,12 @@ import (
55 "path/filepath"
66 "strings"
77
8- "github.com/jesseduffield/lazygit/pkg/commands/models"
98 "github.com/jesseduffield/lazygit/pkg/common"
109 "github.com/jesseduffield/lazygit/pkg/env"
1110 "github.com/jesseduffield/lazygit/pkg/utils"
12- "github.com/samber/lo"
1311 "github.com/stefanhaller/git-todo-parser/todo"
1412)
1513
16- type TodoLine struct {
17- Action string
18- Commit * models.Commit
19- }
20-
21- func (self * TodoLine ) ToString () string {
22- if self .Action == "break" {
23- return self .Action + "\n "
24- }
25- return self .Action + " " + self .Commit .Hash () + " " + self .Commit .Name + "\n "
26- }
27-
28- func TodoLinesToString (todoLines []TodoLine ) string {
29- lines := lo .Map (todoLines , func (todoLine TodoLine , _ int ) string {
30- return todoLine .ToString ()
31- })
32-
33- return strings .Join (lo .Reverse (lines ), "" )
34- }
35-
3614type ChangeTodoAction struct {
3715 Hash string
3816 NewAction todo.TodoCommand
Original file line number Diff line number Diff line change @@ -79,9 +79,6 @@ func (self *CmdObjBuilder) CloneWithNewRunner(decorate func(ICmdObjRunner) ICmdO
7979 }
8080}
8181
82- const CHARS_REQUIRING_QUOTES = "\" \\ $` "
83-
84- // If you update this method, be sure to update CHARS_REQUIRING_QUOTES
8582func (self * CmdObjBuilder ) Quote (message string ) string {
8683 var quote string
8784 if self .platform .OS == "windows" {
Original file line number Diff line number Diff line change @@ -13,14 +13,6 @@ func (gui *Gui) contextTree() *context.ContextTree {
1313 return context .NewContextTree (contextCommon )
1414}
1515
16- // using this wrapper for when an onFocus function doesn't care about any potential
17- // props that could be passed
18- func OnFocusWrapper (f func () error ) func (opts types.OnFocusOpts ) error {
19- return func (opts types.OnFocusOpts ) error {
20- return f ()
21- }
22- }
23-
2416func (gui * Gui ) defaultSideContext () types.Context {
2517 if gui .State .Modes .Filtering .Active () {
2618 return gui .State .Contexts .LocalCommits
Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ func (self *CommitFilesController) openDiffTool(node *filetree.CommitFileNode) e
379379
380380func (self * CommitFilesController ) toggleForPatch (selectedNodes []* filetree.CommitFileNode ) error {
381381 if self .c .AppState .DiffContextSize == 0 {
382- return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextToStage ,
382+ return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextForCustomPatch ,
383383 keybindings .Label (self .c .UserConfig ().Keybinding .Universal .IncreaseContextInDiffView ))
384384 }
385385
@@ -475,7 +475,7 @@ func (self *CommitFilesController) enterCommitFile(node *filetree.CommitFileNode
475475 }
476476
477477 if self .c .AppState .DiffContextSize == 0 {
478- return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextToStage ,
478+ return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextForCustomPatch ,
479479 keybindings .Label (self .c .UserConfig ().Keybinding .Universal .IncreaseContextInDiffView ))
480480 }
481481
You can’t perform that action at this time.
0 commit comments