mirror of
https://github.com/Luzifer/ansible-role-version.git
synced 2024-12-23 19:11:20 +00:00
20 lines
429 B
Go
20 lines
429 B
Go
// +build windows
|
|
|
|
package git
|
|
|
|
import (
|
|
"syscall"
|
|
"time"
|
|
|
|
"gopkg.in/src-d/go-git.v4/plumbing/format/index"
|
|
)
|
|
|
|
func init() {
|
|
fillSystemInfo = func(e *index.Entry, sys interface{}) {
|
|
if os, ok := sys.(*syscall.Win32FileAttributeData); ok {
|
|
seconds := os.CreationTime.Nanoseconds() / 1000000000
|
|
nanoseconds := os.CreationTime.Nanoseconds() - seconds*1000000000
|
|
e.CreatedAt = time.Unix(seconds, nanoseconds)
|
|
}
|
|
}
|
|
}
|