worktree_linux.go
raw| 1 | //go:build linux |
| 2 | // +build linux |
| 3 | |
| 4 | package git |
| 5 | |
| 6 | import ( |
| 7 | "syscall" |
| 8 | "time" |
| 9 | |
| 10 | "github.com/go-git/go-git/v5/plumbing/format/index" |
| 11 | ) |
| 12 | |
| 13 | func init() { |
| 14 | fillSystemInfo = func(e *index.Entry, sys interface{}) { |
| 15 | if os, ok := sys.(*syscall.Stat_t); ok { |
| 16 | e.CreatedAt = time.Unix(os.Ctim.Unix()) |
| 17 | e.Dev = uint32(os.Dev) |
| 18 | e.Inode = uint32(os.Ino) |
| 19 | e.GID = os.Gid |
| 20 | e.UID = os.Uid |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func isSymlinkWindowsNonAdmin(_ error) bool { |
| 26 | return false |
| 27 | } |