Ignore the contents of a default .git/description file
| | |
| | | security: ~ |
| | | fixes: |
| | | - Fix potential NPE on removing uncached repository from cache |
| | | - Ignore the default contents of .git/description file |
| | | changes: |
| | | - Personal repository prefix (~) is now configurable (issue-265) |
| | | - Updated default binary and Lucene ignore extensions |
| | |
| | | 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", ""); |