@@ -28,11 +28,12 @@ import (
28
28
"time"
29
29
30
30
"github.com/fatih/color"
31
+ . "github.com/logrusorgru/aurora"
31
32
"github.com/manifoldco/promptui"
32
33
"github.com/spf13/viper"
33
- gitconfig "github.com/tcnksm/go-gitconfig"
34
34
git "gopkg.in/src-d/go-git.v4"
35
35
"gopkg.in/src-d/go-git.v4/plumbing/object"
36
+ gitconfig "walmart.com/cfm/src/github.com/tcnksm/go-gitconfig"
36
37
)
37
38
38
39
func checkErr (err error ) {
@@ -114,6 +115,7 @@ func commit(message string) (err error) {
114
115
115
116
w , err := r .Worktree ()
116
117
checkErr (err )
118
+ fmt .Println (Gray ("Checking working tree..." ))
117
119
118
120
s , err := w .Status ()
119
121
checkErr (err )
@@ -128,6 +130,7 @@ func commit(message string) (err error) {
128
130
if hasStagingFiles {
129
131
username , err := gitconfig .Username ()
130
132
email , err := gitconfig .Email ()
133
+ fmt .Println (Gray ("Changes added, Preparing commit..." ))
131
134
132
135
_ , err = w .Commit (message , & git.CommitOptions {
133
136
Author : & object.Signature {
@@ -137,8 +140,11 @@ func commit(message string) (err error) {
137
140
},
138
141
})
139
142
checkErr (err )
143
+ lastCommit := "Last commit: " + message
144
+ fmt .Println (Gray (lastCommit ))
145
+ fmt .Println (Green ("Done" ))
140
146
} else {
141
- checkErr (errors .New ("no changes added to commit" ))
147
+ checkErr (errors .New ("No changes added to commit" ))
142
148
}
143
149
144
150
return
0 commit comments