aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-15 15:09:34 -0700
committerUnknwon <u@gogs.io>2016-08-15 15:09:34 -0700
commit6c8fcb3af252f6dfc76021b5acb10ac672dd8ca4 (patch)
treed674d538c0764a6b019490ea598710377da9e619
parent61e27dedf7a02cd01fbf8ad34913c973d057664a (diff)
downloadgitea-6c8fcb3af252f6dfc76021b5acb10ac672dd8ca4.tar.gz
gitea-6c8fcb3af252f6dfc76021b5acb10ac672dd8ca4.zip
#3467 fix clone fail when wiki is empty
-rw-r--r--models/wiki.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/wiki.go b/models/wiki.go
index 24cd6aca21..2f57eadda6 100644
--- a/models/wiki.go
+++ b/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 {