Detect path names which overflow the name length field in the index
commit56d12564ae036b58fd1b1709157b94aca8387690
authorShawn O. Pearce <spearce@spearce.org>
Mon, 18 Aug 2008 16:35:30 +0000 (18 09:35 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Tue, 19 Aug 2008 20:33:56 +0000 (19 22:33 +0200)
tree3774e52db9a04563524ed66b91e19d353e307822
parent5d594b9a05f6bc348cbdd122cd1d13348131cac0
Detect path names which overflow the name length field in the index

C Git allows a path name to be longer than 4095 bytes by storing 4095
into the path name length field within flags and then searching for a
null terminator at the end of the path name, instead of relying on the
length indicatior.  We cannot do this (easily) from an InputStream so
we are currently going to just abort with an exception if we find such
an extremely long path name.

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/dircache/DirCacheEntry.java