소스 검색

Ignore the contents of a default .git/description file

tags/v1.4.0
James Moger 10 년 전
부모
커밋
557a1fa25a
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    0
      releases.moxie
  2. 4
    2
      src/main/java/com/gitblit/GitBlit.java

+ 1
- 0
releases.moxie 파일 보기

@@ -11,6 +11,7 @@ r20: {
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

+ 4
- 2
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", "");

Loading…
취소
저장