Skip to content

Commit 1b6e0c4

Browse files
author
R0n0066
committed
update(utils): Add last commit message
1 parent d626569 commit 1b6e0c4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cmd/utils.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func commit(message string) (err error) {
130130
if hasStagingFiles {
131131
username, err := gitconfig.Username()
132132
email, err := gitconfig.Email()
133-
fmt.Println(Gray("Preparing commit..."))
133+
fmt.Println(Gray("Changes added, Preparing commit..."))
134134

135135
_, err = w.Commit(message, &git.CommitOptions{
136136
Author: &object.Signature{
@@ -140,10 +140,11 @@ func commit(message string) (err error) {
140140
},
141141
})
142142
checkErr(err)
143-
fmt.Println(Green("Done!"))
144-
fmt.Println(Magenta("Happy coding!"))
143+
lastCommit := "Last commit: " + message
144+
fmt.Println(Gray(lastCommit))
145+
fmt.Println(Green("Done"))
145146
} else {
146-
checkErr(errors.New("no changes added to commit"))
147+
checkErr(errors.New("No changes added to commit"))
147148
}
148149

149150
return

0 commit comments

Comments
 (0)