1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 18:17:19 +00:00

Migrate to go-git/go-git v5.0.0 (#10735)

This commit is contained in:
Lauris BH
2020-03-17 18:19:58 +02:00
committed by GitHub
parent 2f928316db
commit 43c09134a9
315 changed files with 15239 additions and 92420 deletions

27
vendor/github.com/go-git/go-billy/v5/osfs/os_posix.go generated vendored Normal file
View File

@ -0,0 +1,27 @@
// +build !plan9,!windows
package osfs
import (
"os"
"golang.org/x/sys/unix"
)
func (f *file) Lock() error {
f.m.Lock()
defer f.m.Unlock()
return unix.Flock(int(f.File.Fd()), unix.LOCK_EX)
}
func (f *file) Unlock() error {
f.m.Lock()
defer f.m.Unlock()
return unix.Flock(int(f.File.Fd()), unix.LOCK_UN)
}
func rename(from, to string) error {
return os.Rename(from, to)
}