summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-07-20 21:08:57 -0400
committerJames Moger <james.moger@gitblit.com>2011-07-20 21:08:57 -0400
commita75a1819f4c7fa5080ddb47545fe9012a842e5b3 (patch)
tree8c3b362c7edf0cb7aec33edfd72252b55c9e3c77
parentdd6f08950e36694d9757adc84ed6805620d0c032 (diff)
downloadgitblit-a75a1819f4c7fa5080ddb47545fe9012a842e5b3.tar.gz
gitblit-a75a1819f4c7fa5080ddb47545fe9012a842e5b3.zip
Misc fixes.
-rw-r--r--src/com/gitblit/utils/JGitUtils.java3
-rw-r--r--tests/com/gitblit/tests/ByteFormatTest.java4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index f8de4299..2e14b679 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -166,7 +166,6 @@ public class JGitUtils {
}
fetch.setRefSpecs(specs);
FetchResult result = fetch.call();
- repository.close();
return result;
}
@@ -299,7 +298,7 @@ public class JGitUtils {
/**
* Determine if a repository has any commits. This is determined by checking
- * for 1 or more heads.
+ * the objects/info and objects/pack folders.
*
* @param repository
* @return true if the repository has commits
diff --git a/tests/com/gitblit/tests/ByteFormatTest.java b/tests/com/gitblit/tests/ByteFormatTest.java
index 462c2f07..43fee350 100644
--- a/tests/com/gitblit/tests/ByteFormatTest.java
+++ b/tests/com/gitblit/tests/ByteFormatTest.java
@@ -24,8 +24,8 @@ public class ByteFormatTest extends TestCase {
public void testByteFormat() throws Exception {
ByteFormat format = new ByteFormat();
assertTrue(format.format(10).equals("10 b"));
- assertTrue(format.format(1024 * 10).equals("10.0 KB"));
- assertTrue(format.format(1024 * 1000).equals("1,000.0 KB"));
+ assertTrue(format.format(1024 * 10).equals("10 KB"));
+ assertTrue(format.format(1024 * 1000).equals("1,000 KB"));
assertTrue(format.format(2 * 1024 * 1000).equals("2.0 MB"));
assertTrue(format.format(1024 * 1024 * 1000).equals("1,000.0 MB"));
assertTrue(format.format(2 * 1024 * 1024 * 1000).equals("2.0 GB"));