@@ -13,16 +13,13 @@ import (
13
13
)
14
14
15
15
var (
16
- focusedStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("#6FD0FB" )).Bold (true )
17
- blurredStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("240" ))
18
- cursorStyle = focusedStyle .Copy ()
19
- noStyle = lipgloss .NewStyle ()
20
-
21
- stagedFilesStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("#10ffcb" ))
22
- cursorModeHelpStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("244" ))
23
-
24
- focusedButton = focusedStyle .Copy ().Render ("[ Commit ]" )
25
- blurredButton = fmt .Sprintf ("[ %s ]" , blurredStyle .Render ("Commit" ))
16
+ focusedStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("#6FD0FB" )).Bold (true )
17
+ blurredStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("240" ))
18
+ cursorStyle = focusedStyle .Copy ()
19
+ noStyle = lipgloss .NewStyle ()
20
+ stagedFilesStyle = lipgloss .NewStyle ().Foreground (lipgloss .Color ("#10ffcb" ))
21
+ focusedButton = focusedStyle .Copy ().Render ("[ Commit ]" )
22
+ blurredButton = fmt .Sprintf ("[ %s ]" , blurredStyle .Render ("Commit" ))
26
23
)
27
24
28
25
type (
@@ -52,6 +49,10 @@ func initialModel() model {
52
49
53
50
stagedFiles := getStagedFiles ()
54
51
52
+ if len (stagedFiles ) == 0 {
53
+ log .Fatal ("No staged files found" )
54
+ }
55
+
55
56
result := strings .Split (branch , "/" )
56
57
57
58
// get first and second result into separate variables
0 commit comments