mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
parent
5fad54248f
commit
11ad296347
2 changed files with 21 additions and 5 deletions
|
@ -84,7 +84,11 @@ func (repo *Repository) LocalWikiPath() string {
|
|||
func (repo *Repository) UpdateLocalWiki() error {
|
||||
// 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(), "")
|
||||
var branch = ""
|
||||
if com.IsExist(repo.LocalWikiPath()) {
|
||||
branch = "master"
|
||||
}
|
||||
return UpdateLocalCopyBranch(repo.WikiPath(), repo.LocalWikiPath(), branch)
|
||||
}
|
||||
|
||||
func discardLocalWikiChanges(localPath string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue