Skip to content

Commit d08a454

Browse files
zennetizenkichimi
andauthored
improved error message when committing without a name or email set. (#1431)
Co-authored-by: Lawrence Cook <lawrencescook@gmail.com>
1 parent 2f517c8 commit d08a454

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

go/libraries/doltcore/doltdb/commit_meta.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ func NewCommitMetaWithUserTS(name, email, desc string, userTS time.Time) (*Commi
6363
e := strings.TrimSpace(email)
6464
d := strings.TrimSpace(desc)
6565

66-
if n == "" || e == "" || d == "" {
66+
if n == "" {
67+
return nil, errors.New("Aborting commit due to empty committer name.")
68+
}
69+
70+
if e == "" {
71+
return nil, errors.New("Aborting commit due to empty committer email.")
72+
}
73+
74+
if d == "" {
6775
return nil, errors.New("Aborting commit due to empty commit message.")
6876
}
6977

0 commit comments

Comments
 (0)