소스 검색

#3467 fix clone fail when wiki is empty

Unknwon 8 년 전
부모
커밋
6c8fcb3af2
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      models/wiki.go

+ 3 - 1
models/wiki.go

@@ -76,7 +76,9 @@ func (repo *Repository) LocalWikiPath() string {
 
 // UpdateLocalWiki makes sure the local copy of repository wiki is up-to-date.
 func (repo *Repository) UpdateLocalWiki() error {
-	return UpdateLocalCopyBranch(repo.WikiPath(), repo.LocalWikiPath(), "master")
+	// Don't pass branch name here because it fails to clone and
+	// checkout to a specific branch when wiki is an empty repository.
+	return UpdateLocalCopyBranch(repo.WikiPath(), repo.LocalWikiPath(), "")
 }
 
 func discardLocalWikiChanges(localPath string) error {