Migrate to go-git/go-git v5.0.0 (#10735)
This commit is contained in:
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
27
vendor/github.com/go-git/go-billy/v5/osfs/os_posix.go
generated
vendored
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue