diff options
Diffstat (limited to 'plumbing/object/tree.go')
-rw-r--r-- | plumbing/object/tree.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plumbing/object/tree.go b/plumbing/object/tree.go index 78d61a1..1f9ea26 100644 --- a/plumbing/object/tree.go +++ b/plumbing/object/tree.go @@ -135,7 +135,7 @@ func (t *Tree) FindEntry(path string) (*TreeEntry, error) { pathCurrent := "" // search for the longest path in the tree path cache - for i := len(pathParts); i > 1; i-- { + for i := len(pathParts) - 1; i > 1; i-- { path := filepath.Join(pathParts[:i]...) tree, ok := t.t[path] |