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 (
5
5
"path/filepath"
6
6
"strings"
7
7
8
- "github.com/jesseduffield/lazygit/pkg/commands/models"
9
8
"github.com/jesseduffield/lazygit/pkg/common"
10
9
"github.com/jesseduffield/lazygit/pkg/env"
11
10
"github.com/jesseduffield/lazygit/pkg/utils"
12
- "github.com/samber/lo"
13
11
"github.com/stefanhaller/git-todo-parser/todo"
14
12
)
15
13
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
-
36
14
type ChangeTodoAction struct {
37
15
Hash string
38
16
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
79
79
}
80
80
}
81
81
82
- const CHARS_REQUIRING_QUOTES = "\" \\ $` "
83
-
84
- // If you update this method, be sure to update CHARS_REQUIRING_QUOTES
85
82
func (self * CmdObjBuilder ) Quote (message string ) string {
86
83
var quote string
87
84
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 {
13
13
return context .NewContextTree (contextCommon )
14
14
}
15
15
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
-
24
16
func (gui * Gui ) defaultSideContext () types.Context {
25
17
if gui .State .Modes .Filtering .Active () {
26
18
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
379
379
380
380
func (self * CommitFilesController ) toggleForPatch (selectedNodes []* filetree.CommitFileNode ) error {
381
381
if self .c .AppState .DiffContextSize == 0 {
382
- return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextToStage ,
382
+ return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextForCustomPatch ,
383
383
keybindings .Label (self .c .UserConfig ().Keybinding .Universal .IncreaseContextInDiffView ))
384
384
}
385
385
@@ -475,7 +475,7 @@ func (self *CommitFilesController) enterCommitFile(node *filetree.CommitFileNode
475
475
}
476
476
477
477
if self .c .AppState .DiffContextSize == 0 {
478
- return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextToStage ,
478
+ return fmt .Errorf (self .c .Tr .Actions .NotEnoughContextForCustomPatch ,
479
479
keybindings .Label (self .c .UserConfig ().Keybinding .Universal .IncreaseContextInDiffView ))
480
480
}
481
481
You can’t perform that action at this time.
0 commit comments