зеркало из https://github.com/golang/build.git
go.tools/dashboard: clone main repo from local path if it already exists locally.
R=adg, minux.ma CC=golang-dev https://golang.org/cl/14462049
This commit is contained in:
Родитель
bd95eb9e7d
Коммит
5f4148cf9b
|
@ -41,7 +41,12 @@ func (r *Repo) Clone(path, rev string) (*Repo, error) {
|
||||||
defer r.Unlock()
|
defer r.Unlock()
|
||||||
|
|
||||||
err := timeout(*cmdTimeout, func() error {
|
err := timeout(*cmdTimeout, func() error {
|
||||||
err := r.Master.VCS.CreateAtRev(path, r.Master.Repo, rev)
|
downloadPath := r.Path
|
||||||
|
if !r.Exists() {
|
||||||
|
downloadPath = r.Master.Repo
|
||||||
|
}
|
||||||
|
|
||||||
|
err := r.Master.VCS.CreateAtRev(path, downloadPath, rev)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче