|
@@ -469,11 +469,17 @@ func (repo *Repository) LocalCopyPath() string {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-func UpdateLocalCopyBranch(repoPath, localPath, branch string) (err error) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+func UpdateLocalCopyBranch(repoPath, localPath, branch string, isWiki bool) (err error) {
|
|
|
if !com.IsExist(localPath) {
|
|
|
+
|
|
|
+ if isWiki {
|
|
|
+ branch = ""
|
|
|
+ }
|
|
|
if err = git.Clone(repoPath, localPath, git.CloneRepoOptions{
|
|
|
Timeout: time.Duration(setting.Git.Timeout.Clone) * time.Second,
|
|
|
Branch: branch,
|
|
@@ -502,7 +508,7 @@ func UpdateLocalCopyBranch(repoPath, localPath, branch string) (err error) {
|
|
|
|
|
|
|
|
|
func (repo *Repository) UpdateLocalCopyBranch(branch string) error {
|
|
|
- return UpdateLocalCopyBranch(repo.RepoPath(), repo.LocalCopyPath(), branch)
|
|
|
+ return UpdateLocalCopyBranch(repo.RepoPath(), repo.LocalCopyPath(), branch, false)
|
|
|
}
|
|
|
|
|
|
|