]> source.dussan.org Git - jgit.git/commit
Fix reading of ref names containing characters that sort before / 18/3718/3
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sun, 12 Jun 2011 22:20:51 +0000 (00:20 +0200)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 22 Jul 2011 09:51:41 +0000 (11:51 +0200)
commitc536873c87db0d87292a90a905b30301c110ceb3
treed1e3664f8d0b016a0a59945c7e6618135292dbf6
parentf1713abcdcb5097d4e44893862bedc6e27dde20e
Fix reading of ref names containing characters that sort before /

A set of ref names like ('a/b' and 'a+b') would cause the RefDirectory
to think that the set of refs have changed because it traversed the
'a' directory in the subtree before looking at 'a+b', but it then
compared with the know refs which are sorted with 'a+b' first.

Fix this by traversing the refs tree in another order. Treat a directory
as if they ends with a '/' before deciding on the order to traverse
the refs tree.

Bug: 348834
Change-Id: I23377f8df00c7252bf27dbcfba5da193c5403917
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefDirectoryTest.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java