jgit/org.eclipse.jgit
Shawn O. Pearce 33e65ec691 Fix sorting of names in RefDirectory
RefDirectory did not correctly follow the contract of RefList.  The
contract says if you use add() method of RefList builder, you MUST
sort() it afterwards, and later every other method assumes that list
is properly sorted (especially the binary search in the find() and
get() methods).  Instead RefDirectory class tried to scan the refs
recursively while sorting every folder in the process before
processing and did not call sort().

For example, when scanning the contents of refs/tags project1 string
is smaller than project1-*, so it will recursively go into the folder
and add these tags first and only then will add project-* ones. This
will result in a broken list (any project1-* string is less than
project1/* one, but they all appear after them in the list), that's
why binary search will fail making loose RefList and the whole local
RefMap completely unusable.

Change-Id: Ibad90017e3b2435b1396b69a22520db4b1b022bb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2011-04-21 12:40:26 -07:00
..
.settings Run formatter on edited lines via save action 2010-08-26 12:33:09 -05:00
META-INF Fix Bundle-Version of jgit source bundle 2011-03-10 14:25:17 +01:00
findBugs [findbugs] Do not ignore exceptional return value of mkdir 2011-01-28 01:11:12 +01:00
resources/org/eclipse/jgit PackWriter: Remove dummy list 0 2011-04-01 17:40:33 -04:00
src/org/eclipse/jgit Fix sorting of names in RefDirectory 2011-04-21 12:40:26 -07:00
.classpath Externalize strings from JGit 2010-05-19 14:37:16 -07:00
.fbprefs Initial JGit contribution to eclipse.org 2009-09-29 16:47:03 -07:00
.gitignore Finish removing Apache Felix maven-bundle-plugin 2010-01-12 11:46:55 -08:00
.project Revert "Hide Maven target directories from Eclipse" 2010-08-28 09:50:50 +02:00
about.html Adding some Eclipse-related legal files to JGit 2010-02-03 15:18:06 -06:00
build.properties Add "resources/" as a source folder 2010-06-05 14:39:27 +02:00
plugin.properties Cleaning up provider and feature names 2010-04-27 09:26:25 -05:00
pom.xml Make running static checks configurable in maven build 2011-04-18 17:38:58 +02:00