Better fix for 'negative position' error on large pack files
commit341b9c1abadd2ac0ec9ecc7c597990070612e058
authorRuth Alkema <ruth@diasoft.nl>
Wed, 11 Mar 2009 15:42:45 +0000 (11 16:42 +0100)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 11 Mar 2009 23:33:54 +0000 (11 16:33 -0700)
tree828d00791fca769ea1eb3bcee004a39b10b567fe
parent4b8d481927fc6425ca3b84c0498601221bd939eb
Better fix for 'negative position' error on large pack files

If position is really big and the window size is fairly small, id can
be negative.  Instead of producing a negative position by extending
id to a long, mask out the low bits from the original position value
to compute the window start.

[sp: message by me, as I had already applied v1 of the patch
     and pushed it (see immediate parent)]

Signed-off-by: Ruth Alkema <ruth@diasoft.nl>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java