From 134a895dbf6db6b9784f165a3a577d6059949169 Mon Sep 17 00:00:00 2001
From: Mohamed MOUNIROU <mmounirou@MacBook-Pro-de-Mohamed.local>
Date: Tue, 04 Oct 2011 16:35:09 -0400
Subject: [PATCH] add tools to install giblet as service on linux based os
---
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