File: worktree_plan9.go

package info (click to toggle)
golang-github-go-git-go-git 5.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,648 kB
  • sloc: makefile: 81; sh: 76
file content (31 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package git

import (
	"syscall"
	"time"

	"github.com/go-git/go-git/v5/plumbing/format/index"
)

func init() {
	fillSystemInfo = func(e *index.Entry, sys interface{}) {
		if os, ok := sys.(*syscall.Dir); ok {
			// Plan 9 doesn't have a CreatedAt field.
			e.CreatedAt = time.Unix(int64(os.Mtime), 0)

			e.Dev = uint32(os.Dev)

			// Plan 9 has no Inode.
			// ext2srv(4) appears to store Inode in Qid.Path.
			e.Inode = uint32(os.Qid.Path)

			// Plan 9 has string UID/GID
			e.GID = 0
			e.UID = 0
		}
	}
}

func isSymlinkWindowsNonAdmin(err error) bool {
	return true
}