From 2711bc82a373a3c2e357b5948e2a6e0c477d8534 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Mon, 22 Oct 2012 16:23:53 -0400
Subject: [PATCH] Fixed bug where owner could not edit a repository through web ui
---
src/com/gitblit/utils/StringUtils.java | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/utils/StringUtils.java b/src/com/gitblit/utils/StringUtils.java
index d115f89..02cc49f 100644
--- a/src/com/gitblit/utils/StringUtils.java
+++ b/src/com/gitblit/utils/StringUtils.java
@@ -692,4 +692,17 @@
}
return path;
}
+
+ /**
+ * Variation of String.matches() which disregards case issues.
+ *
+ * @param regex
+ * @param input
+ * @return true if the pattern matches
+ */
+ public static boolean matchesIgnoreCase(String input, String regex) {
+ Pattern p = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
+ Matcher m = p.matcher(input);
+ return m.matches();
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1