mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Use Unix Epoch time for staged commit time
This commit is contained in:
1 parent
5152e1fc63
commit
db79a96118
1 file changed
+3
-2
+3
-2
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user