Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions cmd/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,17 @@ var commitCmd = &cobra.Command{
}
}

// git commit automatically
color.Cyan("Git record changes to the repository")
output, err := g.Commit(commitMessage)
if err != nil {
return err
noCommit := os.Getenv("GIT_INDEX_FILE") != ""

// git commit automatically unless running from within hook
if !noCommit {
color.Cyan("Git record changes to the repository")
output, err := g.Commit(commitMessage)
if err != nil {
return err
}
color.Yellow(output)
}
color.Yellow(output)
return nil
},
}
1 change: 1 addition & 0 deletions prompt/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var languageMaps = map[string]string{
"ja": "Japanese",
"pt": "Portuguese",
"pt-br": "Brazilian Portuguese",
"ru": "Russian",
}

// GetLanguage returns the language name for the given language code,
Expand Down