]> source.dussan.org Git - gitea.git/commitdiff
#3467 fix clone fail when wiki is empty
authorUnknwon <u@gogs.io>
Mon, 15 Aug 2016 22:09:34 +0000 (15:09 -0700)
committerUnknwon <u@gogs.io>
Mon, 15 Aug 2016 22:09:34 +0000 (15:09 -0700)
models/wiki.go

index 24cd6aca21724873e694da2b86067c7c342e05b2..2f57eadda6d46b0ccc0798eecc216ae6c419b45a 100644 (file)
@@ -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 {