From 01df7536992af375a54bbedf45369a475953e372 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sun, 2 May 2021 23:40:08 +0200 Subject: *: use go-billy instead of os calls --- worktree_js.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 worktree_js.go (limited to 'worktree_js.go') diff --git a/worktree_js.go b/worktree_js.go new file mode 100644 index 0000000..7267d05 --- /dev/null +++ b/worktree_js.go @@ -0,0 +1,26 @@ +// +build js + +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.Stat_t); ok { + e.CreatedAt = time.Unix(int64(os.Ctime), int64(os.CtimeNsec)) + e.Dev = uint32(os.Dev) + e.Inode = uint32(os.Ino) + e.GID = os.Gid + e.UID = os.Uid + } + } +} + +func isSymlinkWindowsNonAdmin(err error) bool { + return false +} -- cgit