Protect WorkingTreeIterator's name encoding from weird ByteBuffers
commit3803252cdbcf34e9247909d73ce0239422c2916a
authorShawn O. Pearce <spearce@spearce.org>
Tue, 12 Aug 2008 01:07:49 +0000 (11 18:07 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 14 Aug 2008 17:33:19 +0000 (14 19:33 +0200)
tree6ef0babd5365f06195069e49de22a9b6a5950d87
parent7d766ecc5d752d4c4eae17cbf6c84eab9fb1b294
Protect WorkingTreeIterator's name encoding from weird ByteBuffers

If a ByteBuffer decides to be cute and give us an array but use
an array offset that isn't zero we cannot use its array as our
own encodedName array.  Instead we must create a copy of the array
so we can safely assume where the path starts.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/treewalk/WorkingTreeIterator.java