From 7b835f5a9bb54de4997ea16dc48971aa20b1bbbf Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 15 May 2014 13:19:44 -0400
Subject: [PATCH] Wrap flotr2 chart labels with double-quotes not single-quotes
---
src/main/java/com/gitblit/utils/JGitUtils.java | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/gitblit/utils/JGitUtils.java b/src/main/java/com/gitblit/utils/JGitUtils.java
index c6526c2..190872a 100644
--- a/src/main/java/com/gitblit/utils/JGitUtils.java
+++ b/src/main/java/com/gitblit/utils/JGitUtils.java
@@ -711,7 +711,7 @@
try {
// resolve object id
ObjectId branchObject;
- if (StringUtils.isEmpty(objectId)) {
+ if (StringUtils.isEmpty(objectId) || "HEAD".equalsIgnoreCase(objectId)) {
branchObject = getDefaultBranch(repository);
} else {
branchObject = repository.resolve(objectId);
@@ -2256,8 +2256,10 @@
}
} catch (IOException e) {
LOGGER.error("Failed to determine canMerge", e);
- } finally {
- revWalk.release();
+ } finally {
+ if (revWalk != null) {
+ revWalk.release();
+ }
}
return MergeStatus.NOT_MERGEABLE;
}
@@ -2347,8 +2349,10 @@
}
} catch (IOException e) {
LOGGER.error("Failed to merge", e);
- } finally {
- revWalk.release();
+ } finally {
+ if (revWalk != null) {
+ revWalk.release();
+ }
}
return new MergeResult(MergeStatus.FAILED, null);
}
--
Gitblit v1.9.1