aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/file.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-03-03 16:09:36 +0100
committerGitHub <noreply@github.com>2017-03-03 16:09:36 +0100
commit59335b69777f2ef311e63b7d3464459a3ac51d48 (patch)
treed0b64c76d599bb1f58fc358ae5879bef262cea0f /plumbing/object/file.go
parentd105e15d91e7553d9d40d6e9fffe0a5008cf8afe (diff)
parentda704cfac743a91474baf45df226e5ec034146b0 (diff)
downloadgo-git-59335b69777f2ef311e63b7d3464459a3ac51d48.tar.gz
Merge pull request #297 from alcortesm/issue274
issue #274: new filemode package
Diffstat (limited to 'plumbing/object/file.go')
-rw-r--r--plumbing/object/file.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/object/file.go b/plumbing/object/file.go
index 4866777..5f24cf0 100644
--- a/plumbing/object/file.go
+++ b/plumbing/object/file.go
@@ -3,9 +3,9 @@ package object
import (
"bytes"
"io"
- "os"
"strings"
+ "srcd.works/go-git.v4/plumbing/filemode"
"srcd.works/go-git.v4/plumbing/storer"
"srcd.works/go-git.v4/utils/ioutil"
)
@@ -16,13 +16,13 @@ type File struct {
// depending of the function that generates it.
Name string
// Mode is the file mode.
- Mode os.FileMode
+ Mode filemode.FileMode
// Blob with the contents of the file.
Blob
}
// NewFile returns a File based on the given blob object
-func NewFile(name string, m os.FileMode, b *Blob) *File {
+func NewFile(name string, m filemode.FileMode, b *Blob) *File {
return &File{Name: name, Mode: m, Blob: *b}
}
@@ -81,7 +81,7 @@ func (iter *FileIter) Next() (*File, error) {
return nil, err
}
- if entry.Mode.IsDir() || entry.Mode == SubmoduleMode {
+ if entry.Mode == filemode.Dir || entry.Mode == filemode.Submodule {
continue
}