aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_unix_other.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-10-24 00:31:26 +0200
committerGitHub <noreply@github.com>2018-10-24 00:31:26 +0200
commit50bbba3872116aa3e5a37c316b1fda83a7fac344 (patch)
tree297a6e513a1d24d06033e7a70c4b87ddabb78f1b /worktree_unix_other.go
parentf2a7dad17c6fdc7e6c9a99bac8a6d09ec1c71c01 (diff)
parent1241d740739fd0a2a157db9c935cf9272b52ec0f (diff)
downloadgo-git-50bbba3872116aa3e5a37c316b1fda83a7fac344.tar.gz
Merge pull request #992 from yuce/enable-openbsd-dragonfly-solaris
git: enables building on OpenBSD, Dragonfly BSD and Solaris
Diffstat (limited to 'worktree_unix_other.go')
-rw-r--r--worktree_unix_other.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/worktree_unix_other.go b/worktree_unix_other.go
new file mode 100644
index 0000000..d632767
--- /dev/null
+++ b/worktree_unix_other.go
@@ -0,0 +1,26 @@
+// +build openbsd dragonfly solaris
+
+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.Stat_t); ok {
+ e.CreatedAt = time.Unix(int64(os.Atim.Sec), int64(os.Atim.Nsec))
+ 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
+}