From 8daefa09d99774639a355c0dfa2b989fa1007f5f Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 11 Oct 2012 17:11:18 -0400
Subject: [PATCH] Created static repository close functions for unit testing and fixed Windows sharing violations
---
src/com/gitblit/models/RefModel.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/com/gitblit/models/RefModel.java b/src/com/gitblit/models/RefModel.java
index acac776..8489c81 100644
--- a/src/com/gitblit/models/RefModel.java
+++ b/src/com/gitblit/models/RefModel.java
@@ -24,7 +24,6 @@
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevObject;
import org.eclipse.jgit.revwalk.RevTag;
-import org.eclipse.jgit.revwalk.RevTree;
/**
* RefModel is a serializable model class that represents a tag or branch and
@@ -62,6 +61,9 @@
}
public String getName() {
+ if (reference == null) {
+ return displayName;
+ }
return reference.getName();
}
--
Gitblit v1.9.1