From 166e6a131d0693d20b3cc08f252705608d24d5f0 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 27 Apr 2011 21:56:56 -0400
Subject: [PATCH] Improve repo folder detection. Fail gracefully on create repo error.

---
 src/com/gitblit/utils/GitBlitDiffFormatter.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/com/gitblit/utils/GitBlitDiffFormatter.java b/src/com/gitblit/utils/GitBlitDiffFormatter.java
index 54cb6c2..b8dceb4 100644
--- a/src/com/gitblit/utils/GitBlitDiffFormatter.java
+++ b/src/com/gitblit/utils/GitBlitDiffFormatter.java
@@ -97,6 +97,10 @@
 				// skip index lines
 			} else if (line.startsWith("new file")) {
 				// skip new file lines
+			} else if (line.startsWith("\\ No newline")) {
+				// skip no new line
+			} else if (line.startsWith("---") || line.startsWith("+++")) {
+				// skip --- +++ lines
 			} else if (line.startsWith("diff")) {
 				if (line.indexOf(oldnull) > -1) {
 					// a is null, use b
@@ -115,8 +119,6 @@
 				sb.append("<div class=\"diff\">");	
 				sb.append("<table><tbody>");
 				inFile = true;
-			} else if (line.startsWith("---") || line.startsWith("+++")) {
-				// skip --- +++ lines
 			} else {
 				sb.append(line).append('\n');
 			}

--
Gitblit v1.9.1