Use Unix Epoch time for staged commit time

This commit is contained in:
Peter Gallagher committed 2019-11-29 10:07:27 +00:00
1 parent 5152e1fc63
commit db79a96118
1 file changed
+3 -2
+3 -2
View File
@@ -104,11 +104,12 @@ func (repo *Repo) AuditUncommitted() error {
if err != nil { if err != nil {
return err return err
} }
// Staged change so the commit details do not yet exist. Insert empty defaults.
c.Hash = plumbing.Hash{} c.Hash = plumbing.Hash{}
c.Message = "STAGED CHANGES" c.Message = "***STAGED CHANGES***"
c.Author.Name = "" c.Author.Name = ""
c.Author.Email = "" c.Author.Email = ""
c.Author.When = time.Now() c.Author.When = time.Unix(0, 0).UTC()
prevTree, err := c.Tree() prevTree, err := c.Tree()
if err != nil { if err != nil {