From 9b1b817de9bfe8db7eee781663af3005dfa0ab01 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 11 May 2021 14:48:41 -0500 Subject: [PATCH] fallback value for committer email --- splitter/state.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/splitter/state.go b/splitter/state.go index ed2eec8..d8f342e 100644 --- a/splitter/state.go +++ b/splitter/state.go @@ -477,7 +477,12 @@ func (s *state) copyCommit(rev *git.Commit, tree *git.Tree, parents []*git.Commi author.Email = "nobody@example.com" } - oid, err := s.repo.CreateCommit("", author, rev.Committer(), message, tree, parents...) + committer := rev.Committer() + if committer.Email == "" { + committer.Email = "nobody@example.com" + } + + oid, err := s.repo.CreateCommit("", author, committer, message, tree, parents...) if err != nil { return nil, err }