]> source.dussan.org Git - jgit.git/commit
Update PackBitmapIndexRemapper to handle mappings not in the new pack. 10/11910/1
authorColby Ranger <cranger@google.com>
Mon, 15 Apr 2013 16:35:07 +0000 (09:35 -0700)
committerColby Ranger <cranger@google.com>
Mon, 15 Apr 2013 16:35:07 +0000 (09:35 -0700)
commiteaa52b12f542e1d52c277989533a3c1bea3cc02e
treea2eabbc3ace44add6863f76841bebcba07c4d9a6
parent4c638be79fde7c34ca0fcaad13d7c4f1d9c5ddd2
Update PackBitmapIndexRemapper to handle mappings not in the new pack.

Previously, the code assumed all commits in the old pack would also
be present in the new pack. This assumption caused an
ArrayIndexOutOfBoundsException during remapping of ids. Fix the
iterator to only return entries that may be remapped. Furthermore,
update getBitmap() to return null if commit does not exist in the
new pack.

Change-Id: I065babe8cd39a7654c916bd01c7012135733dddf
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java