From 8e40cd53b6b1579e383bd5e993cb3c35ce4583c4 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 27 Oct 2011 08:16:46 -0400
Subject: [PATCH] Add version number and date to ServerStatus. Conditionally hide status.

---
 tests/com/gitblit/tests/JGitUtilsTest.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/com/gitblit/tests/JGitUtilsTest.java b/tests/com/gitblit/tests/JGitUtilsTest.java
index 0841da3..0d7aa63 100644
--- a/tests/com/gitblit/tests/JGitUtilsTest.java
+++ b/tests/com/gitblit/tests/JGitUtilsTest.java
@@ -33,6 +33,7 @@
 import org.eclipse.jgit.lib.RepositoryCache.FileKey;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
 
 import com.gitblit.GitBlit;
 import com.gitblit.Keys;
@@ -197,6 +198,13 @@
 				.equals("183474d554e6f68478a02d9d7888b67a9338cdff"));
 	}
 
+	public void testCreateOrphanedBranch() throws Exception {
+		Repository repository = JGitUtils.createRepository(GitBlitSuite.REPOSITORIES, "orphantest");
+		assertTrue(JGitUtils.createOrphanBranch(repository,
+				"x" + Long.toHexString(System.currentTimeMillis()).toUpperCase()));
+		FileUtils.delete(repository.getDirectory(), FileUtils.RECURSIVE);
+	}
+
 	public void testStringContent() throws Exception {
 		Repository repository = GitBlitSuite.getHelloworldRepository();
 		String contentA = JGitUtils.getStringContent(repository, null, "java.java");
@@ -357,4 +365,5 @@
 		assertTrue(zipFileB.length() > 0);
 		zipFileB.delete();
 	}
+
 }
\ No newline at end of file

--
Gitblit v1.9.1