From 30f9d25d77ccb5cd978d4cf8fa389ec819e90e95 Mon Sep 17 00:00:00 2001
From: Philip L. McMahon <philip.l.mcmahon@gmail.com>
Date: Fri, 27 Jan 2012 02:02:19 -0500
Subject: [PATCH] Correct update of HEAD symbolic reference when target is a tag.

---
 src/com/gitblit/utils/StringUtils.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java
index 1e47899..fc0bf42 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/com/gitblit/utils/StringUtils.java
@@ -488,4 +488,11 @@
 		String bs = Integer.toHexString((int) (b * 256));
 		return "#" + rs + gs + bs;
 	}
+	
+	public static String stripDotGit(String value) {
+		if (value.toLowerCase().endsWith(".git")) {
+			return value.substring(0, value.length() - 4);
+		}
+		return value;
+	}
 }
\ No newline at end of file

--
Gitblit v1.9.1