git-lfs/tools/util_generic.go
brian m. carlson a27bda0eb9
tools: remove the use of cgo on Linux
We currently import the C package solely for a single value: the FICLONE
ioctl, which is a constant.  Since this is a constant and also part of
the Linux kernel ABI, there's no reason we need to have the C compiler
generate it for us every time we build.  We can instead hard-code the
constant in place, since it will never change.

This avoids the need for cgo in order to have a functional invocation of
git lfs dedup on Linux.
2020-02-14 15:16:02 +00:00

24 lines
415 B
Go

// +build !linux
// +build !darwin !cgo
// +build !windows
package tools
import (
"io"
"github.com/git-lfs/git-lfs/errors"
)
func CheckCloneFileSupported(dir string) (supported bool, err error) {
return false, errors.New("unsupported platform")
}
func CloneFile(writer io.Writer, reader io.Reader) (bool, error) {
return false, nil
}
func CloneFileByPath(_, _ string) (bool, error) {
return false, nil
}