aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/difftree.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/difftree.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/difftree.go')
-rw-r--r--plumbing/object/difftree.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/plumbing/object/difftree.go b/plumbing/object/difftree.go
index e6e0cb0..bcc78ad 100644
--- a/plumbing/object/difftree.go
+++ b/plumbing/object/difftree.go
@@ -2,8 +2,8 @@ package object
import (
"bytes"
- "os"
+ "srcd.works/go-git.v4/plumbing/filemode"
"srcd.works/go-git.v4/utils/merkletrie"
"srcd.works/go-git.v4/utils/merkletrie/noder"
)
@@ -49,14 +49,11 @@ func equivalentMode(a, b []byte) bool {
}
var (
- file = modeToBytes(FileMode)
- fileDeprecated = modeToBytes(FileModeDeprecated)
- // remove this by fixing plumbing.Object mode ASAP
- fileGoGit = modeToBytes(os.FileMode(0644))
+ file = filemode.Regular.Bytes()
+ fileDeprecated = filemode.Deprecated.Bytes()
)
func isFilish(b []byte) bool {
return bytes.Equal(b, file) ||
- bytes.Equal(b, fileDeprecated) ||
- bytes.Equal(b, fileGoGit)
+ bytes.Equal(b, fileDeprecated)
}