diff options
author | Santiago M. Mola <santi@mola.io> | 2017-03-03 16:09:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-03 16:09:36 +0100 |
commit | 59335b69777f2ef311e63b7d3464459a3ac51d48 (patch) | |
tree | d0b64c76d599bb1f58fc358ae5879bef262cea0f /plumbing/object/difftree.go | |
parent | d105e15d91e7553d9d40d6e9fffe0a5008cf8afe (diff) | |
parent | da704cfac743a91474baf45df226e5ec034146b0 (diff) | |
download | go-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.go | 11 |
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) } |