From 73f1adb2e84b8b9cd4045bcdd7d9afa72d3875b5 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Tue, 27 Nov 2012 17:13:03 -0500
Subject: [PATCH] Added short commit id column to log and history tables (issue 168)

---
 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