diff options
author | James Moger <james.moger@gitblit.com> | 2013-09-17 17:39:10 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-09-17 17:39:10 -0400 |
commit | 557a1fa25a0a1d60bdb71ea3ad0e4e9a9cd9cc61 (patch) | |
tree | 0fa1cbf7f4d22c431b4330868e9b12c69e6b0914 /src | |
parent | f084f468756bde745d8e8e27c729f6e57bea5749 (diff) | |
download | gitblit-557a1fa25a0a1d60bdb71ea3ad0e4e9a9cd9cc61.tar.gz gitblit-557a1fa25a0a1d60bdb71ea3ad0e4e9a9cd9cc61.zip |
Ignore the contents of a default .git/description file
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/GitBlit.java | 6 |
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", ""); |