summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/GitBlit.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 1afbbc98..8c0d62da 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -1990,8 +1990,10 @@ public class GitBlit implements ServletContextListener {
if (getConfig(config,"description", null) == null) {
File descFile = new File(r.getDirectory(), "description");
if (descFile.exists()) {
- config.setString(Constants.CONFIG_GITBLIT, null, "description",
- com.gitblit.utils.FileUtils.readContent(descFile, System.getProperty("line.separator")));
+ String desc = com.gitblit.utils.FileUtils.readContent(descFile, System.getProperty("line.separator"));
+ if (!desc.toLowerCase().startsWith("unnamed repository")) {
+ config.setString(Constants.CONFIG_GITBLIT, null, "description", desc);
+ }
}
}
model.description = getConfig(config, "description", "");