diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
index 3f0bc04..8cdc066 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java
@@ -43,8 +43,6 @@
  */
 package org.eclipse.jgit.api;
 
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -248,8 +246,8 @@ public void testCheckoutOfDirectoryShouldBeRecursive() throws Exception {
 		write(b, "modified");
 		git.checkout().addPath("dir").call();
 
-		assertThat(read(a), is("A"));
-		assertThat(read(b), is("B"));
+		assertEquals(read(a), "A");
+		assertEquals(read(b), "B");
 	}
 
 	@Test
@@ -263,8 +261,8 @@ public void testCheckoutAllPaths() throws Exception {
 		write(b, "modified");
 		git.checkout().setAllPaths(true).call();
 
-		assertThat(read(a), is("A"));
-		assertThat(read(b), is("B"));
+		assertEquals(read(a), "A");
+		assertEquals(read(b), "B");
 	}
 
 	@Test
@@ -279,7 +277,7 @@ public void testCheckoutWithStartPoint() throws Exception {
 		git.checkout().setCreateBranch(true).setName("a")
 				.setStartPoint(first.getId().getName()).call();
 
-		assertThat(read(a), is("A"));
+		assertEquals(read(a), "A");
 	}
 
 	@Test
@@ -296,8 +294,8 @@ public void testCheckoutWithStartPointOnlyCertainFiles() throws Exception {
 		git.checkout().setCreateBranch(true).setName("a")
 				.setStartPoint(first.getId().getName()).addPath("a.txt").call();
 
-		assertThat(read(a), is("A"));
-		assertThat(read(b), is("other"));
+		assertEquals(read(a), "A");
+		assertEquals(read(b), "other");
 	}
 
 	@Test
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java
deleted file mode 100644
index fb9cc2c..0000000
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutMaliciousPathTest.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (C) 2011, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Distribution License v1.0 which accompanies this
- * distribution, is reproduced below, and is available at
- * http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.lib;
-
-import static org.hamcrest.Matchers.startsWith;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-
-import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.errors.GitAPIException;
-import org.eclipse.jgit.dircache.InvalidPathException;
-import org.eclipse.jgit.junit.MockSystemReader;
-import org.eclipse.jgit.revwalk.RevWalk;
-import org.eclipse.jgit.util.SystemReader;
-import org.junit.Test;
-
-public class DirCacheCheckoutMaliciousPathTest extends RepositoryTestCase {
-	protected ObjectId theHead;
-	protected ObjectId theMerge;
-
-	@Test
-	public void testMaliciousAbsolutePathIsOk() throws Exception {
-		testMaliciousPathGoodFirstCheckout("ok");
-	}
-
-	@Test
-	public void testMaliciousAbsolutePathIsOkSecondCheckout() throws Exception {
-		testMaliciousPathGoodSecondCheckout("ok");
-	}
-
-	@Test
-	public void testMaliciousAbsolutePathIsOkTwoLevels() throws Exception {
-		testMaliciousPathGoodSecondCheckout("a", "ok");
-	}
-
-	@Test
-	public void testMaliciousAbsolutePath() throws Exception {
-		testMaliciousPathBadFirstCheckout("/tmp/x");
-	}
-
-	@Test
-	public void testMaliciousAbsolutePathSecondCheckout() throws Exception {
-		testMaliciousPathBadSecondCheckout("/tmp/x");
-	}
-
-	@Test
-	public void testMaliciousAbsolutePathTwoLevelsFirstBad() throws Exception {
-		testMaliciousPathBadFirstCheckout("/tmp/x", "y");
-	}
-
-	@Test
-	public void testMaliciousAbsolutePathTwoLevelsSecondBad() throws Exception {
-		testMaliciousPathBadFirstCheckout("y", "/tmp/x");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteCurDrivePathWindows() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("\\somepath");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteCurDrivePathWindowsOnUnix()
-			throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathGoodFirstCheckout("\\somepath");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteUNCPathWindows1() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("\\\\somepath");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteUNCPathWindows1OnUnix() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathGoodFirstCheckout("\\\\somepath");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteUNCPathWindows2() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("\\/somepath");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteUNCPathWindows2OnUnix() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathBadFirstCheckout("\\/somepath");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteWindowsPath1() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("c:\\temp\\x");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteWindowsPath1OnUnix() throws Exception {
-		if (File.separatorChar == '\\')
-			return; // cannot emulate Unix on Windows for this test
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathGoodFirstCheckout("c:\\temp\\x");
-	}
-
-	@Test
-	public void testMaliciousAbsoluteWindowsPath2() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setCurrentPlatform();
-		testMaliciousPathBadFirstCheckout("c:/temp/x");
-	}
-
-	@Test
-	public void testMaliciousGitPath1() throws Exception {
-		testMaliciousPathBadFirstCheckout(".git/konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPath2() throws Exception {
-		testMaliciousPathBadFirstCheckout(".git", "konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPath1Case() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows(); // or OS X
-		testMaliciousPathBadFirstCheckout(".Git/konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPath2Case() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows(); // or OS X
-		testMaliciousPathBadFirstCheckout(".gIt", "konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPath3Case() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows(); // or OS X
-		testMaliciousPathBadFirstCheckout(".giT", "konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPathEndSpaceWindows() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout(".git ", "konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPathEndSpaceUnixOk() throws Exception {
-		if (File.separatorChar == '\\')
-			return; // cannot emulate Unix on Windows for this test
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathGoodFirstCheckout(".git ", "konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPathEndDotWindows1() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout(".git.", "konfig");
-	}
-
-	@Test
-	public void testMaliciousGitPathEndDotWindows2() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout(".f.");
-	}
-
-	@Test
-	public void testMaliciousGitPathEndDotWindows3() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathGoodFirstCheckout(".f");
-	}
-
-	@Test
-	public void testMaliciousGitPathEndDotUnixOk() throws Exception {
-		if (File.separatorChar == '\\')
-			return; // cannot emulate Unix on Windows for this test
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathGoodFirstCheckout(".git.", "konfig");
-	}
-
-	@Test
-	public void testMaliciousPathDotDot() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setCurrentPlatform();
-		testMaliciousPathBadFirstCheckout("..", "no");
-	}
-
-	@Test
-	public void testMaliciousPathDot() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setCurrentPlatform();
-		testMaliciousPathBadFirstCheckout(".", "no");
-	}
-
-	@Test
-	public void testMaliciousPathEmpty() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setCurrentPlatform();
-		testMaliciousPathBadFirstCheckout("", "no");
-	}
-
-	@Test
-	public void testMaliciousWindowsADS() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("some:path");
-	}
-
-	@Test
-	public void testMaliciousWindowsADSOnUnix() throws Exception {
-		if (File.separatorChar == '\\')
-			return; // cannot emulate Unix on Windows for this test
-		((MockSystemReader) SystemReader.getInstance()).setUnix();
-		testMaliciousPathGoodFirstCheckout("some:path");
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgCon() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("con");
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgConDotSuffix() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("con.txt");
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgLpt1() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("lpt1");
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgLpt1DotSuffix() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathBadFirstCheckout("lpt1.txt");
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgDotCon() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathGoodFirstCheckout(".con");
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgLpr() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathGoodFirstCheckout("lpt"); // good name
-	}
-
-	@Test
-	public void testForbiddenNamesOnWindowsEgCon1() throws Exception {
-		((MockSystemReader) SystemReader.getInstance()).setWindows();
-		testMaliciousPathGoodFirstCheckout("con1"); // good name
-	}
-
-	@Test
-	public void testForbiddenWindowsNamesOnUnixEgCon() throws Exception {
-		if (File.separatorChar == '\\')
-			return; // cannot emulate Unix on Windows for this test
-		testMaliciousPathGoodFirstCheckout("con");
-	}
-
-	@Test
-	public void testForbiddenWindowsNamesOnUnixEgLpt1() throws Exception {
-		if (File.separatorChar == '\\')
-			return; // cannot emulate Unix on Windows for this test
-		testMaliciousPathGoodFirstCheckout("lpt1");
-	}
-
-	private void testMaliciousPathBadFirstCheckout(String... paths)
-			throws Exception {
-		testMaliciousPath(false, false, paths);
-	}
-
-	private void testMaliciousPathBadSecondCheckout(String... paths) throws Exception {
-		testMaliciousPath(false, true, paths);
-	}
-
-	private void testMaliciousPathGoodFirstCheckout(String... paths)
-			throws Exception {
-		testMaliciousPath(true, false, paths);
-	}
-
-	private void testMaliciousPathGoodSecondCheckout(String... paths) throws Exception {
-		testMaliciousPath(true, true, paths);
-	}
-
-	/**
-	 * Create a bad tree and tries to check it out
-	 *
-	 * @param good
-	 *            true if we expect this to pass
-	 * @param secondCheckout
-	 *            perform the actual test on the second checkout
-	 * @param path
-	 *            to the blob, one or more levels
-	 * @throws GitAPIException
-	 * @throws IOException
-	 */
-	private void testMaliciousPath(boolean good, boolean secondCheckout,
-			String... path) throws GitAPIException, IOException {
-		Git git = new Git(db);
-		ObjectInserter newObjectInserter;
-		newObjectInserter = git.getRepository().newObjectInserter();
-		ObjectId blobId = newObjectInserter.insert(Constants.OBJ_BLOB,
-				"data".getBytes());
-		newObjectInserter = git.getRepository().newObjectInserter();
-		FileMode mode = FileMode.REGULAR_FILE;
-		ObjectId insertId = blobId;
-		for (int i = path.length - 1; i >= 0; --i) {
-			TreeFormatter treeFormatter = new TreeFormatter();
-			treeFormatter.append("goodpath", mode, insertId);
-			insertId = newObjectInserter.insert(treeFormatter);
-			mode = FileMode.TREE;
-		}
-		newObjectInserter = git.getRepository().newObjectInserter();
-		CommitBuilder commitBuilder = new CommitBuilder();
-		commitBuilder.setAuthor(author);
-		commitBuilder.setCommitter(committer);
-		commitBuilder.setMessage("foo#1");
-		commitBuilder.setTreeId(insertId);
-		ObjectId firstCommitId = newObjectInserter.insert(commitBuilder);
-
-		newObjectInserter = git.getRepository().newObjectInserter();
-		mode = FileMode.REGULAR_FILE;
-		insertId = blobId;
-		for (int i = path.length - 1; i >= 0; --i) {
-			TreeFormatter treeFormatter = new TreeFormatter();
-			treeFormatter.append(path[i], mode, insertId);
-			insertId = newObjectInserter.insert(treeFormatter);
-			mode = FileMode.TREE;
-		}
-
-		// Create another commit
-		commitBuilder = new CommitBuilder();
-		commitBuilder.setAuthor(author);
-		commitBuilder.setCommitter(committer);
-		commitBuilder.setMessage("foo#2");
-		commitBuilder.setTreeId(insertId);
-		commitBuilder.setParentId(firstCommitId);
-		ObjectId commitId = newObjectInserter.insert(commitBuilder);
-
-		RevWalk revWalk = new RevWalk(git.getRepository());
-		if (!secondCheckout)
-			git.checkout().setStartPoint(revWalk.parseCommit(firstCommitId))
-					.setName("refs/heads/master").setCreateBranch(true).call();
-		try {
-			if (secondCheckout) {
-				git.checkout().setStartPoint(revWalk.parseCommit(commitId))
-						.setName("refs/heads/master").setCreateBranch(true)
-						.call();
-			} else {
-				git.branchCreate().setName("refs/heads/next")
-						.setStartPoint(commitId.name()).call();
-				git.checkout().setName("refs/heads/next")
-						.call();
-			}
-			if (!good)
-				fail("Checkout of Tree " + Arrays.asList(path) + " should fail");
-		} catch (InvalidPathException e) {
-			if (good)
-				throw e;
-			assertThat(e.getMessage(), startsWith("Invalid path: "));
-		}
-	}
-
-}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/RootLocaleTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/RootLocaleTest.java
deleted file mode 100644
index 4e694b6..0000000
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/nls/RootLocaleTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2010, Sasa Zivkov <sasa.zivkov@sap.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.nls;
-
-import org.eclipse.jgit.awtui.UIText;
-import org.eclipse.jgit.console.ConsoleText;
-import org.eclipse.jgit.internal.JGitText;
-import org.eclipse.jgit.iplog.IpLogText;
-import org.eclipse.jgit.pgm.CLIText;
-import org.junit.Before;
-import org.junit.Test;
-
-public class RootLocaleTest {
-	@Before
-	public void setUp() {
-		NLS.setLocale(NLS.ROOT_LOCALE);
-	}
-
-	@Test
-	public void testJGitText() {
-		NLS.getBundleFor(JGitText.class);
-	}
-
-	@Test
-	public void testConsoleText() {
-		NLS.getBundleFor(ConsoleText.class);
-	}
-
-	@Test
-	public void testCLIText() {
-		NLS.getBundleFor(CLIText.class);
-	}
-
-	@Test
-	public void testUIText() {
-		NLS.getBundleFor(UIText.class);
-	}
-
-	@Test
-	public void testIpLogText() {
-		NLS.getBundleFor(IpLogText.class);
-	}
-}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
index 484039e..fb36482 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
@@ -60,110 +60,95 @@
  */
 public class MergeResult {
 
-	/**
-	 * The status the merge resulted in.
-	 */
-	public enum MergeStatus {
-		/** */
-		FAST_FORWARD {
-			@Override
+	public static abstract class MergeStatus {
+		public static MergeStatus FAST_FORWARD = new FAST_FORWARD_Class ();
+		public static MergeStatus FAST_FORWARD_SQUASHED = new FAST_FORWARD_SQUASHED_Class ();
+		public static MergeStatus ALREADY_UP_TO_DATE = new ALREADY_UP_TO_DATE_Class ();
+		public static MergeStatus FAILED = new FAILED_Class ();
+		public static MergeStatus MERGED = new MERGED_Class ();
+		public static MergeStatus MERGED_SQUASHED = new MERGED_SQUASHED_Class ();
+		public static MergeStatus CONFLICTING = new CONFLICTING_Class ();
+		public static MergeStatus NOT_SUPPORTED = new NOT_SUPPORTED_Class ();
+
+		static class FAST_FORWARD_Class extends MergeStatus {
 			public String toString() {
 				return "Fast-forward";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-		/**
-		 * @since 2.0
-		 */
-		FAST_FORWARD_SQUASHED {
-			@Override
-			public String toString() {
+		}
+
+		static class FAST_FORWARD_SQUASHED_Class extends MergeStatus {
+			public String toString () {
 				return "Fast-forward-squashed";
 			}
 
-			@Override
-			public boolean isSuccessful() {
+			public boolean isSuccessful () {
 				return true;
 			}
-		},
-		/** */
-		ALREADY_UP_TO_DATE {
-			@Override
+		}
+
+		static class ALREADY_UP_TO_DATE_Class extends MergeStatus {
 			public String toString() {
 				return "Already-up-to-date";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-		/** */
-		FAILED {
-			@Override
+		}
+
+		static class FAILED_Class extends MergeStatus {
 			public String toString() {
 				return "Failed";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return false;
 			}
-		},
-		/** */
-		MERGED {
-			@Override
+		}
+
+		static class MERGED_Class extends MergeStatus {
 			public String toString() {
 				return "Merged";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-		/**
-		 * @since 2.0
-		 */
-		MERGED_SQUASHED {
-			@Override
+		}
+
+		static class MERGED_SQUASHED_Class extends MergeStatus {
 			public String toString() {
 				return "Merged-squashed";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-		/** */
-		CONFLICTING {
-			@Override
+		}
+
+		static class CONFLICTING_Class extends MergeStatus {
 			public String toString() {
 				return "Conflicting";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return false;
 			}
-		},
-		/** */
-		NOT_SUPPORTED {
-			@Override
+		}
+
+		static class NOT_SUPPORTED_Class extends MergeStatus {
 			public String toString() {
 				return "Not-yet-supported";
 			}
 
-			@Override
 			public boolean isSuccessful() {
 				return false;
 			}
-		};
+		}
 
 		/**
 		 * @return whether the status indicates a successful result
@@ -363,7 +348,10 @@ public void addConflict(String path, org.eclipse.jgit.merge.MergeResult<?> lowLe
 			}
 		}
 		int currentConflict = -1;
-		int[][] ret=new int[nrOfConflicts][mergedCommits.length+1];
+		int[][] ret = new int[nrOfConflicts][];
+		for (int n = 0; n < nrOfConflicts; n++)
+			ret[n] = new int[mergedCommits.length + 1];
+
 		for (MergeChunk mergeChunk : lowLevelResult) {
 			// to store the end of this chunk (end of the last conflicting range)
 			int endOfChunk = 0;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index 6f87349..5c3a9f6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -85,6 +85,7 @@
 import org.eclipse.jgit.lib.ProgressMonitor;
 import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.RefUpdate;
+import org.eclipse.jgit.lib.RepositoryState;
 import org.eclipse.jgit.lib.RefUpdate.Result;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
@@ -719,33 +720,30 @@ private RevCommit tryFastForward(String headName, RevCommit oldCommit,
 	}
 
 	private void checkParameters() throws WrongRepositoryStateException {
+		RepositoryState s = repo.getRepositoryState();
 		if (this.operation != Operation.BEGIN) {
 			// these operations are only possible while in a rebasing state
-			switch (repo.getRepositoryState()) {
-			case REBASING_INTERACTIVE:
-			case REBASING:
-			case REBASING_REBASING:
-			case REBASING_MERGE:
-				break;
-			default:
+			if (s != RepositoryState.REBASING_INTERACTIVE &&
+				s != RepositoryState.REBASING &&
+				s != RepositoryState.REBASING_REBASING &&
+				s != RepositoryState.REBASING_MERGE)
 				throw new WrongRepositoryStateException(MessageFormat.format(
 						JGitText.get().wrongRepositoryState, repo
 								.getRepositoryState().name()));
-			}
-		} else
-			switch (repo.getRepositoryState()) {
-			case SAFE:
+		} else {
+			if (s == RepositoryState.SAFE) {
 				if (this.upstreamCommit == null)
 					throw new JGitInternalException(MessageFormat
 							.format(JGitText.get().missingRequiredParameter,
 									"upstream"));
 				return;
-			default:
+			} else {
 				throw new WrongRepositoryStateException(MessageFormat.format(
 						JGitText.get().wrongRepositoryState, repo
 								.getRepositoryState().name()));
 
 			}
+		}
 	}
 
 	private void createFile(File parentDir, String name, String content)
@@ -988,10 +986,10 @@ public RebaseCommand setProgressMonitor(ProgressMonitor monitor) {
 		return this;
 	}
 
-	static enum Action {
-		PICK("pick"); // later add SQUASH, EDIT, etc.
+	static class Action {
+		public static Action PICK = new Action ("pick"); // later add SQUASH, EDIT, etc.
 
-		private final String token;
+		public final String token;
 
 		private Action(String token) {
 			this.token = token;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java
index a09f8c2..d05fa4e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java
@@ -52,80 +52,58 @@
  * The result of a {@link RebaseCommand} execution
  */
 public class RebaseResult {
-	/**
-	 * The overall status
-	 */
-	public enum Status {
-		/**
-		 * Rebase was successful, HEAD points to the new commit
-		 */
-		OK {
-			@Override
+
+	public static abstract class Status {
+		public static Status OK = new OK_Class ();
+		public static Status ABORTED = new ABORTED_Class ();
+		public static Status STOPPED = new STOPPED_Class ();
+		public static Status FAILED = new FAILED_Class ();
+		public static Status UP_TO_DATE = new UP_TO_DATE_Class ();
+		public static Status FAST_FORWARD = new FAST_FORWARD_Class ();
+		public static Status NOTHING_TO_COMMIT = new NOTHING_TO_COMMIT_Class ();
+
+		static class OK_Class extends Status {
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-		/**
-		 * Aborted; the original HEAD was restored
-		 */
-		ABORTED {
-			@Override
+		}
+
+		static class ABORTED_Class extends Status {
 			public boolean isSuccessful() {
 				return false;
 			}
-		},
-		/**
-		 * Stopped due to a conflict; must either abort or resolve or skip
-		 */
-		STOPPED {
-			@Override
+		}
+
+		static class STOPPED_Class extends Status {
 			public boolean isSuccessful() {
 				return false;
 			}
-		},
-		/**
-		 * Failed; the original HEAD was restored
-		 */
-		FAILED {
-			@Override
+		}
+
+		static class FAILED_Class extends Status {
 			public boolean isSuccessful() {
 				return false;
 			}
-		},
-		/**
-		 * Already up-to-date
-		 */
-		UP_TO_DATE {
-			@Override
+		}
+
+		static class UP_TO_DATE_Class extends Status {
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-		/**
-		 * Fast-forward, HEAD points to the new commit
-		 */
-		FAST_FORWARD {
-			@Override
+		}
+
+		static class FAST_FORWARD_Class extends Status {
 			public boolean isSuccessful() {
 				return true;
 			}
-		},
-
-		/**
-		 * Continue with nothing left to commit (possibly want skip).
-		 *
-		 * @since 2.0
-		 */
-		NOTHING_TO_COMMIT {
-			@Override
+		}
+
+		static class NOTHING_TO_COMMIT_Class extends Status {
 			public boolean isSuccessful() {
 				return false;
 			}
-		};
+		}
 
-		/**
-		 * @return whether the status indicates a successful result
-		 */
 		public abstract boolean isSuccessful();
 	}
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java
index 5084e9d..5c43d86 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java
@@ -80,7 +80,7 @@
 		RENAME,
 
 		/** Copy an existing file to a new location, keeping the original */
-		COPY;
+		COPY
 	}
 
 	/** Specify the old or new side for more generalized access. */
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
index f0c7cda..ac0812d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
@@ -76,7 +76,7 @@
 		REPLACE,
 
 		/** Sequence A and B have zero length, describing nothing. */
-		EMPTY;
+		EMPTY
 	}
 
 	int beginA;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
index 70f80ae..a6806c3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
@@ -52,7 +52,7 @@
  * The different update strategies extend this class to provide their own unique
  * services to applications.
  */
-abstract class BaseDirCacheEditor {
+public abstract class BaseDirCacheEditor {
 	/** The cache instance this editor updates during {@link #finish()}. */
 	protected DirCache cache;
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java
index c9b483f..4b871d5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java
@@ -227,15 +227,15 @@ public boolean isEmpty() {
 
 			private int tblIdx;
 
-			private V next;
+			private V nextv;
 
 			public boolean hasNext() {
 				return found < size;
 			}
 
 			public V next() {
-				if (next != null)
-					return found(next);
+				if (nextv != null)
+					return foundv(nextv);
 
 				for (;;) {
 					V[] table = directory[dirIdx];
@@ -249,15 +249,15 @@ public V next() {
 					while (tblIdx < table.length) {
 						V v = table[tblIdx++];
 						if (v != null)
-							return found(v);
+							return foundv(v);
 					}
 				}
 			}
 
 			@SuppressWarnings("unchecked")
-			private V found(V v) {
+			private V foundv(V v) {
 				found++;
-				next = (V) v.next;
+				nextv = (V) v.next;
 				return v;
 			}
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java
index f119c44..d961602 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java
@@ -57,20 +57,20 @@
  */
 public interface Ref {
 	/** Location where a {@link Ref} is stored. */
-	public static enum Storage {
+	public static class Storage {
 		/**
 		 * The ref does not exist yet, updating it may create it.
 		 * <p>
 		 * Creation is likely to choose {@link #LOOSE} storage.
 		 */
-		NEW(true, false),
+		public static Storage NEW = new Storage(true, false);
 
 		/**
 		 * The ref is stored in a file by itself.
 		 * <p>
 		 * Updating this ref affects only this ref.
 		 */
-		LOOSE(true, false),
+		public static Storage LOOSE = new Storage(true, false);
 
 		/**
 		 * The ref is stored in the <code>packed-refs</code> file, with others.
@@ -78,7 +78,7 @@
 		 * Updating this ref requires rewriting the file, with perhaps many
 		 * other refs being included at the same time.
 		 */
-		PACKED(false, true),
+		public static Storage PACKED = new Storage(false, true);
 
 		/**
 		 * The ref is both {@link #LOOSE} and {@link #PACKED}.
@@ -86,7 +86,7 @@
 		 * Updating this ref requires only updating the loose file, but deletion
 		 * requires updating both the loose file and the packed refs file.
 		 */
-		LOOSE_PACKED(true, true),
+		public static Storage LOOSE_PACKED = new Storage(true, true);
 
 		/**
 		 * The ref came from a network advertisement and storage is unknown.
@@ -95,7 +95,7 @@
 		 * side, as Git-aware code consolidate the remote refs and reported them
 		 * to this process.
 		 */
-		NETWORK(false, false);
+		public static Storage NETWORK = new Storage(false, false);
 
 		private final boolean loose;
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 911b1f6..5727433 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -775,7 +775,6 @@ private RevCommit resolveReflog(RevWalk rw, Ref ref, String time)
 			throw new RevisionSyntaxException(MessageFormat.format(
 					JGitText.get().invalidReflogRevision, time));
 		}
-		assert number >= 0;
 		ReflogReader reader = new ReflogReader(this, ref.getName());
 		ReflogEntry entry = reader.getReverseEntry(number);
 		if (entry == null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
index 7e3ba51..4a7034d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java
@@ -54,246 +54,202 @@
  * The granularity and set of states are somewhat arbitrary. The methods
  * on the state are the only supported means of deciding what to do.
  */
-public enum RepositoryState {
+public abstract class RepositoryState {
 	/** Has no work tree and cannot be used for normal editing. */
-	BARE {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState BARE = new BARE_Class ();
 
-		@Override
+	static class BARE_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return false; }
-
-		@Override
 		public boolean canCommit() { return false; }
-
-		@Override
 		public boolean canAmend() { return false; }
-
-		@Override
 		public String getDescription() { return "Bare"; }
-	},
+		public String name() {
+			return "BARE";
+		}
+	}
 
 	/**
 	 * A safe state for working normally
 	 * */
-	SAFE {
-		@Override
-		public boolean canCheckout() { return true; }
+	public static RepositoryState SAFE = new SAFE_Class ();
 
-		@Override
+	static class SAFE_Class extends RepositoryState {
+		public boolean canCheckout() { return true; }
 		public boolean canResetHead() { return true; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return true; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_normal; }
-	},
+		public String name() {
+			return "SAFE";
+		}
+	}
 
 	/** An unfinished merge. Must resolve or reset before continuing normally
 	 */
-	MERGING {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState MERGING = new MERGING_Class ();
 
-		@Override
+	static class MERGING_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return true; }
-
-		@Override
 		public boolean canCommit() { return false; }
-
-		@Override
 		public boolean canAmend() { return false; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_conflicts; }
-	},
+		public String name() {
+			return "MERGING";
+		}
+	}
 
 	/**
 	 * An merge where all conflicts have been resolved. The index does not
 	 * contain any unmerged paths.
 	 */
-	MERGING_RESOLVED {
-		@Override
-		public boolean canCheckout() { return true; }
+	public static RepositoryState MERGING_RESOLVED = new MERGING_RESOLVED_Class ();
 
-		@Override
+	static class MERGING_RESOLVED_Class extends RepositoryState {
+		public boolean canCheckout() { return true; }
 		public boolean canResetHead() { return true; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return false; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_merged; }
-	},
+		public String name() {
+			return "MERGING_RESOLVED";
+		}
+	}
 
 	/** An unfinished cherry-pick. Must resolve or reset before continuing normally
 	 */
-	CHERRY_PICKING {
-		@Override
+	public static RepositoryState CHERRY_PICKING = new CHERRY_PICKING_Class ();
+	
+	static class CHERRY_PICKING_Class extends RepositoryState {
 		public boolean canCheckout() { return false; }
-
-		@Override
 		public boolean canResetHead() { return true; }
-
-		@Override
 		public boolean canCommit() { return false; }
-
-		@Override
 		public boolean canAmend() { return false; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_conflicts; }
-	},
+		public String name() {
+			return "CHERRY_PICKING";
+		}
+	}
 
 	/**
 	 * A cherry-pick where all conflicts have been resolved. The index does not
 	 * contain any unmerged paths.
 	 */
-	CHERRY_PICKING_RESOLVED {
-		@Override
+	public static RepositoryState CHERRY_PICKING_RESOLVED = new CHERRY_PICKING_RESOLVED_Class ();
+	
+	static class CHERRY_PICKING_RESOLVED_Class extends RepositoryState {
 		public boolean canCheckout() { return true; }
-
-		@Override
 		public boolean canResetHead() { return true; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return false; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_merged; }
-	},
+		public String name() {
+			return "CHERRY_PICKING_RESOLVED";
+		}
+	}
 
 	/**
 	 * An unfinished rebase or am. Must resolve, skip or abort before normal work can take place
 	 */
-	REBASING {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState REBASING = new REBASING_Class ();
 
-		@Override
+	static class REBASING_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return false; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return true; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_rebaseOrApplyMailbox; }
-	},
+		public String name() {
+			return "REBASING";
+		}
+	}
 
 	/**
 	 * An unfinished rebase. Must resolve, skip or abort before normal work can take place
 	 */
-	REBASING_REBASING {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState REBASING_REBASING = new REBASING_REBASING_Class ();
 
-		@Override
+	static class REBASING_REBASING_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return false; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return true; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_rebase; }
-	},
+		public String name() {
+			return "REBASING_REBASING";
+		}
+	}
 
 	/**
 	 * An unfinished apply. Must resolve, skip or abort before normal work can take place
 	 */
-	APPLY {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState APPLY = new APPLY_Class ();
 
-		@Override
+	static class APPLY_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return false; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return true; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_applyMailbox; }
-	},
+		public String name() {
+			return "APPLY";
+		}
+	}
 
 	/**
 	 * An unfinished rebase with merge. Must resolve, skip or abort before normal work can take place
 	 */
-	REBASING_MERGE {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState REBASING_MERGE = new REBASING_MERGE_Class ();
 
-		@Override
+	static class REBASING_MERGE_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return false; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return true; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_rebaseWithMerge; }
-	},
+		public String name() {
+			return "REBASING_MERGE";
+		}
+	}
 
 	/**
 	 * An unfinished interactive rebase. Must resolve, skip or abort before normal work can take place
 	 */
-	REBASING_INTERACTIVE {
-		@Override
-		public boolean canCheckout() { return false; }
+	public static RepositoryState REBASING_INTERACTIVE = new REBASING_INTERACTIVE_Class ();
 
-		@Override
+	static class REBASING_INTERACTIVE_Class extends RepositoryState {
+		public boolean canCheckout() { return false; }
 		public boolean canResetHead() { return false; }
-
-		@Override
 		public boolean canCommit() { return true; }
-
-		@Override
 		public boolean canAmend() { return true; }
-
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_rebaseInteractive; }
-	},
+		public String name() {
+			return "REBASING_INTERACTIVE";
+		}
+	}
 
 	/**
 	 * Bisecting being done. Normal work may continue but is discouraged
 	 */
-	BISECTING {
+	public static RepositoryState BISECTING = new BISECTING_Class ();
+
+	static class BISECTING_Class extends RepositoryState {
 		/* Changing head is a normal operation when bisecting */
-		@Override
 		public boolean canCheckout() { return true; }
 
 		/* Do not reset, checkout instead */
-		@Override
 		public boolean canResetHead() { return false; }
 
 		/* Commit during bisect is useful */
-		@Override
 		public boolean canCommit() { return true; }
 
-		@Override
 		public boolean canAmend() { return false; }
 
-		@Override
 		public String getDescription() { return JGitText.get().repositoryState_bisecting; }
+		public String name() {
+			return "BISECTING";
+		}
 	};
 
 	/**
@@ -320,4 +276,6 @@
 	 * @return a human readable description of the state.
 	 */
 	public abstract String getDescription();
+
+	public abstract String name();
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java
index 9e8e256..b774b1b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java
@@ -127,7 +127,7 @@ public void endWorker() {
 	 * ThreadSafeProgressMonior.
 	 */
 	public void pollForUpdates() {
-		assert isMainThread();
+		//assert isMainThread();
 		doUpdates();
 	}
 
@@ -142,7 +142,7 @@ public void pollForUpdates() {
 	 *             completion of workers.
 	 */
 	public void waitForCompletion() throws InterruptedException {
-		assert isMainThread();
+		//assert isMainThread();
 		while (0 < workers.get()) {
 			doUpdates();
 			process.acquire();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
index 1782bb2..7ca4267 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
@@ -104,7 +104,7 @@
 
 	private NameConflictTreeWalk tw;
 
-	private String commitNames[];
+	private String[] commitNames;
 
 	private static final int T_BASE = 0;
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
index 340b674..3dd89c1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
@@ -61,7 +61,7 @@
 		LITERAL_DEFLATED,
 
 		/** A Git pack-style delta is stored, deflated. */
-		DELTA_DEFLATED;
+		DELTA_DEFLATED
 	}
 
 	private final FileHeader file;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java
index 843c2af..b533a3b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java
@@ -43,7 +43,7 @@
 
 package org.eclipse.jgit.revwalk;
 
-abstract class AbstractRevQueue extends Generator {
+public abstract class AbstractRevQueue extends Generator {
 	static final AbstractRevQueue EMPTY_QUEUE = new AlwaysEmptyQueue();
 
 	/** Current output flags set for this generator instance. */
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
index 30d140a..8dd8d72 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
@@ -48,7 +48,7 @@
 import org.eclipse.jgit.errors.IncorrectObjectTypeException;
 import org.eclipse.jgit.errors.MissingObjectException;
 
-abstract class BlockRevQueue extends AbstractRevQueue {
+public abstract class BlockRevQueue extends AbstractRevQueue {
 	protected BlockFreeList free;
 
 	/** Create an empty revision queue. */
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
index a95303b..c67652f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
@@ -59,7 +59,7 @@
  * @see PendingGenerator
  * @see StartGenerator
  */
-abstract class Generator {
+public abstract class Generator {
 	/** Commits are sorted by commit date and time, descending. */
 	static final int SORT_COMMIT_TIME_DESC = 1 << 0;
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java
index f28facb..f8283f2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java
@@ -60,7 +60,7 @@
 import org.eclipse.jgit.storage.pack.PackWriter;
 import org.eclipse.jgit.util.FS;
 
-abstract class FileObjectDatabase extends ObjectDatabase {
+public abstract class FileObjectDatabase extends ObjectDatabase {
 	static enum InsertLooseObjectResult {
 		INSERTED, EXISTS_PACKED, EXISTS_LOOSE, FAILURE;
 	}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackReverseIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackReverseIndex.java
index 990106b..20aafab 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackReverseIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackReverseIndex.java
@@ -68,18 +68,18 @@
 	/**
 	 * (offset31, truly) Offsets accommodating in 31 bits.
 	 */
-	private final int offsets32[];
+	private final int[] offsets32;
 
 	/**
 	 * Offsets not accommodating in 31 bits.
 	 */
-	private final long offsets64[];
+	private final long[] offsets64;
 
 	/** Position of the corresponding {@link #offsets32} in {@link #index}. */
-	private final int nth32[];
+	private final int[] nth32;
 
 	/** Position of the corresponding {@link #offsets64} in {@link #index}. */
-	private final int nth64[];
+	private final int[] nth64;
 
 	/**
 	 * Create reverse index from straight/forward pack index, by indexing all
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java
index 99ec75c..1ff8bca 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java
@@ -189,7 +189,7 @@ public void remove() {
 	}
 
 	@SuppressWarnings("unchecked")
-	private final BlockList<ObjectToPack> objectsLists[] = new BlockList[Constants.OBJ_TAG + 1];
+	private final BlockList<ObjectToPack>[] objectsLists = new BlockList[Constants.OBJ_TAG + 1];
 	{
 		objectsLists[Constants.OBJ_COMMIT] = new BlockList<ObjectToPack>();
 		objectsLists[Constants.OBJ_TREE] = new BlockList<ObjectToPack>();
@@ -229,7 +229,7 @@ public void remove() {
 
 	private List<ObjectToPack> sortedByName;
 
-	private byte packcsum[];
+	private byte[] packcsum;
 
 	private boolean deltaBaseAsOffset;
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
index c7cee1e..d16e1c0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
@@ -76,7 +76,7 @@
  * @see BasePackFetchConnection
  * @see BasePackPushConnection
  */
-abstract class BasePackConnection extends BaseConnection {
+public abstract class BasePackConnection extends BaseConnection {
 
 	/** The repository this transport fetches into, or pushes out of. */
 	protected final Repository local;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
index 582b75a..f02608a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
@@ -180,8 +180,12 @@
 	 */
 	public static final String OPTION_NO_DONE = "no-done";
 
-	static enum MultiAck {
-		OFF, CONTINUE, DETAILED;
+	static class MultiAck {
+		public static final int OFF = 0;
+
+		public static final int CONTINUE = 1;
+
+		public static final int DETAILED = 2;
 	}
 
 	private final RevWalk walk;
@@ -201,7 +205,7 @@
 	/** Marks a commit listed in the advertised refs. */
 	final RevFlag ADVERTISED;
 
-	private MultiAck multiAck = MultiAck.OFF;
+	private int multiAck = MultiAck.OFF;
 
 	private boolean thinPack;
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
index 4c7ffec..493d059 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
@@ -87,7 +87,7 @@
 		UPDATE_NONFASTFORWARD,
 
 		/** Delete an existing ref; the ref should already exist. */
-		DELETE;
+		DELETE
 	}
 
 	/** Result of the update command. */
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
index f75ac70..90ddadc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
@@ -127,6 +127,8 @@
 
 	private String name;
 
+	private String oldName;
+
 	private List<URIish> uris;
 
 	private List<URIish> pushURIs;
@@ -163,6 +165,7 @@
 	public RemoteConfig(final Config rc, final String remoteName)
 			throws URISyntaxException {
 		name = remoteName;
+		oldName = remoteName;
 
 		String[] vlst;
 		String val;
@@ -240,6 +243,11 @@ public void update(final Config rc) {
 		set(rc, KEY_TAGOPT, getTagOpt().option(), TagOpt.AUTO_FOLLOW.option());
 		set(rc, KEY_MIRROR, mirror, DEFAULT_MIRROR);
 		set(rc, KEY_TIMEOUT, timeout, 0);
+
+		if (!oldName.equals(name)) {
+			rc.unsetSection(SECTION, oldName);
+			oldName = name;
+		}
 	}
 
 	private void set(final Config rc, final String key,
@@ -309,6 +317,16 @@ public String getName() {
 	}
 
 	/**
+	 * Set the local name this remote configuration is recognized as.
+	 * 
+	 * @param newName
+	 *            the new name of this remote.
+	 */
+	public void setName(String newName) {
+		name = newName;
+	}
+
+	/**
 	 * Get all configured URIs under this remote.
 	 *
 	 * @return the set of URIs known to this remote.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
index 3b25870..9b7b7ac 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
@@ -49,7 +49,7 @@
 import org.eclipse.jgit.internal.JGitText;
 
 /** Specification of annotated tag behavior during fetch. */
-public enum TagOpt {
+public class TagOpt {
 	/**
 	 * Automatically follow tags if we fetch the thing they point at.
 	 * <p>
@@ -59,7 +59,7 @@
 	 * prove that we already have (or will have when the fetch completes) the
 	 * object the annotated tag peels (dereferences) to.
 	 */
-	AUTO_FOLLOW(""),
+	public static TagOpt AUTO_FOLLOW = new TagOpt ("");
 
 	/**
 	 * Never fetch tags, even if we have the thing it points at.
@@ -69,7 +69,7 @@
 	 * publishes annotated tags, but you are not interested in the tags and only
 	 * want their branches.
 	 */
-	NO_TAGS("--no-tags"),
+	public static TagOpt NO_TAGS = new TagOpt("--no-tags");
 
 	/**
 	 * Always fetch tags, even if we do not have the thing it points at.
@@ -78,7 +78,7 @@
 	 * hundreds of megabytes of objects to be fetched if the receiving
 	 * repository does not yet have the necessary dependencies.
 	 */
-	FETCH_TAGS("--tags");
+	public static TagOpt FETCH_TAGS = new TagOpt("--tags");
 
 	private final String option;
 
@@ -111,4 +111,8 @@ public static TagOpt fromOption(final String o) {
 		}
 		throw new IllegalArgumentException(MessageFormat.format(JGitText.get().invalidTagOption, o));
 	}
+
+	private static TagOpt[] values() {
+		return new TagOpt[] { AUTO_FOLLOW, NO_TAGS, FETCH_TAGS };
+	}
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index c2cda54..95069a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -252,7 +252,7 @@ public String getLine() {
 
 	private RequestPolicy requestPolicy = RequestPolicy.ADVERTISED;
 
-	private MultiAck multiAck = MultiAck.OFF;
+	private int multiAck = MultiAck.OFF;
 
 	private boolean noDone;
 
@@ -875,14 +875,14 @@ private ObjectId processHaveLines(List<ObjectId> peerHas, ObjectId last)
 				// If both sides have the same object; let the client know.
 				//
 				switch (multiAck) {
-				case OFF:
+				case MultiAck.OFF:
 					if (commonBase.size() == 1)
 						pckOut.writeString("ACK " + obj.name() + "\n");
 					break;
-				case CONTINUE:
+				case MultiAck.CONTINUE:
 					pckOut.writeString("ACK " + obj.name() + " continue\n");
 					break;
-				case DETAILED:
+				case MultiAck.DETAILED:
 					pckOut.writeString("ACK " + obj.name() + " common\n");
 					break;
 				}
@@ -924,12 +924,12 @@ private ObjectId processHaveLines(List<ObjectId> peerHas, ObjectId last)
 					didOkToGiveUp = true;
 					if (okToGiveUp()) {
 						switch (multiAck) {
-						case OFF:
+						case MultiAck.OFF:
 							break;
-						case CONTINUE:
+						case MultiAck.CONTINUE:
 							pckOut.writeString("ACK " + id.name() + " continue\n");
 							break;
-						case DETAILED:
+						case MultiAck.DETAILED:
 							pckOut.writeString("ACK " + id.name() + " ready\n");
 							sentReady = true;
 							break;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java
index 315d909..98cedfa 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java
@@ -146,7 +146,7 @@ public AbstractTreeIterator createSubtreeIterator(final ObjectReader reader)
 	/**
 	 * Wrapper for a standard Java IO file
 	 */
-	static public class FileEntry extends Entry {
+	static class FileEntry extends Entry {
 		final File file;
 
 		private final FileMode mode;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
index 9ee5f8b..648d597 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
@@ -135,6 +135,12 @@
 	private int contentIdOffset;
 
 	/**
+	 * Cached value of isEntryIgnored(). 0 if not ignored, 1 if ignored, -1 if
+	 * the value is not yet cached.
+	 */
+	private int ignoreStatus = -1;
+
+	/**
 	 * Create a new iterator with no parent.
 	 *
 	 * @param options
@@ -569,6 +575,8 @@ public boolean isEntryIgnored() throws IOException {
 	 *             a relevant ignore rule file exists but cannot be read.
 	 */
 	protected boolean isEntryIgnored(final int pLen) throws IOException {
+		if (ignoreStatus != -1)
+			return ignoreStatus == 1;
 		IgnoreNode rules = getIgnoreNode();
 		if (rules != null) {
 			// The ignore code wants path to start with a '/' if possible.
@@ -581,15 +589,20 @@ protected boolean isEntryIgnored(final int pLen) throws IOException {
 			String p = TreeWalk.pathOf(path, pOff, pLen);
 			switch (rules.isIgnored(p, FileMode.TREE.equals(mode))) {
 			case IGNORED:
+				ignoreStatus = 1;
 				return true;
 			case NOT_IGNORED:
+				ignoreStatus = 0;
 				return false;
 			case CHECK_PARENT:
 				break;
 			}
 		}
-		if (parent instanceof WorkingTreeIterator)
-			return ((WorkingTreeIterator) parent).isEntryIgnored(pLen);
+		if (parent instanceof WorkingTreeIterator) {
+			ignoreStatus = ((WorkingTreeIterator) parent).isEntryIgnored(pLen) ? 1 : 0;
+			return ignoreStatus == 1;
+		}
+		ignoreStatus = 0;
 		return false;
 	}
 
@@ -757,8 +770,10 @@ public MetadataDiff compareMetadata(DirCacheEntry entry) {
 		// only. Otherwise we compare the timestamp at millisecond precision.
 		long cacheLastModified = entry.getLastModified();
 		long fileLastModified = getEntryLastModified();
-		if (cacheLastModified % 1000 == 0)
+		if (cacheLastModified % 1000 == 0 || fileLastModified % 1000 == 0) {
+			cacheLastModified = cacheLastModified - cacheLastModified % 1000;
 			fileLastModified = fileLastModified - fileLastModified % 1000;
+		}
 
 		if (fileLastModified != cacheLastModified)
 			return MetadataDiff.DIFFER_BY_TIMESTAMP;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java
index acc1ae6..686d65a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java
@@ -129,17 +129,15 @@ public String toString() {
 	public static final TreeFilter ANY_DIFF = new AnyDiffFilter();
 
 	private static final class AnyDiffFilter extends TreeFilter {
-		private static final int baseTree = 0;
-
 		@Override
 		public boolean include(final TreeWalk walker) {
 			final int n = walker.getTreeCount();
 			if (n == 1) // Assume they meant difference to empty tree.
 				return true;
 
-			final int m = walker.getRawMode(baseTree);
+			final int m = walker.getRawMode(0);
 			for (int i = 1; i < n; i++)
-				if (walker.getRawMode(i) != m || !walker.idEqual(i, baseTree))
+				if (walker.getRawMode(i) != m || !walker.idEqual(i, 0))
 					return true;
 			return false;
 		}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java
index f1743d4..b76ecc6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java
@@ -97,17 +97,30 @@ private static SimpleDateFormat getDateFormat(ParseableSimpleDateFormat f) {
 	// like "yesterday" or "1 week ago") which this parser can parse but which
 	// are not listed here because they are parsed without the help of a
 	// SimpleDateFormat.
-	enum ParseableSimpleDateFormat {
-		ISO("yyyy-MM-dd HH:mm:ss Z"), //
-		RFC("EEE, dd MMM yyyy HH:mm:ss Z"), //
-		SHORT("yyyy-MM-dd"), //
-		SHORT_WITH_DOTS_REVERSE("dd.MM.yyyy"), //
-		SHORT_WITH_DOTS("yyyy.MM.dd"), //
-		SHORT_WITH_SLASH("MM/dd/yyyy"), //
-		DEFAULT("EEE MMM dd HH:mm:ss yyyy Z"), //
-		LOCAL("EEE MMM dd HH:mm:ss yyyy");
-
-		String formatStr;
+	public static class ParseableSimpleDateFormat {
+		public static ParseableSimpleDateFormat ISO = new ParseableSimpleDateFormat ("yyyy-MM-dd HH:mm:ss Z"); //
+		public static ParseableSimpleDateFormat RFC = new ParseableSimpleDateFormat ("EEE, dd MMM yyyy HH:mm:ss Z"); //
+		public static ParseableSimpleDateFormat SHORT = new ParseableSimpleDateFormat ("yyyy-MM-dd"); //
+		public static ParseableSimpleDateFormat SHORT_WITH_DOTS_REVERSE = new ParseableSimpleDateFormat("dd.MM.yyyy"); //
+		public static ParseableSimpleDateFormat SHORT_WITH_DOTS = new ParseableSimpleDateFormat("yyyy.MM.dd"); //
+		public static ParseableSimpleDateFormat SHORT_WITH_SLASH = new ParseableSimpleDateFormat("MM/dd/yyyy"); //
+		public static ParseableSimpleDateFormat DEFAULT = new ParseableSimpleDateFormat ("EEE MMM dd HH:mm:ss yyyy Z"); //
+		public static ParseableSimpleDateFormat LOCAL = new ParseableSimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");
+		public static ParseableSimpleDateFormat[] values ()
+		{
+			return new ParseableSimpleDateFormat[] {
+				ISO,
+				RFC,
+				SHORT,
+				SHORT_WITH_DOTS_REVERSE,
+				SHORT_WITH_DOTS,
+				SHORT_WITH_SLASH,
+				DEFAULT,
+				LOCAL
+			};
+		}		
+
+		public String formatStr;
 
 		private ParseableSimpleDateFormat(String formatStr) {
 			this.formatStr = formatStr;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
index e9d9953..196e0e7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
@@ -112,7 +112,6 @@ public String getHostname() {
 					// we do nothing
 					hostname = "localhost";
 				}
-				assert hostname != null;
 			}
 			return hostname;
 		}
