use more realtime output for git clone
This commit is contained in:
parent
4ab00cce02
commit
2e8a1d4793
|
@ -7,8 +7,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"go.wit.com/log"
|
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// reports externally if something has changed
|
// reports externally if something has changed
|
||||||
|
|
2
git.go
2
git.go
|
@ -10,8 +10,8 @@ import (
|
||||||
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
|
||||||
"go.wit.com/log"
|
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (rs *RepoStatus) GetCurrentBranchName() string {
|
func (rs *RepoStatus) GetCurrentBranchName() string {
|
||||||
|
|
9
new.go
9
new.go
|
@ -154,7 +154,12 @@ func Clone(wdir string, path string) error {
|
||||||
path = "go.googlesource.com/xerrors"
|
path = "go.googlesource.com/xerrors"
|
||||||
}
|
}
|
||||||
|
|
||||||
shell.PathRun(fulldir, []string{"git", "clone", "http://" + path})
|
r := shell.PathRunRealtime(fulldir, []string{"git", "clone", "--verbose", "--progress", "http://" + path})
|
||||||
|
if r.Error != nil {
|
||||||
|
log.Warn("git clone error", r.Error)
|
||||||
|
log.Error(r.Error)
|
||||||
|
}
|
||||||
|
|
||||||
if IsDirectory(fullpath) {
|
if IsDirectory(fullpath) {
|
||||||
// clone worked
|
// clone worked
|
||||||
return nil
|
return nil
|
||||||
|
@ -166,7 +171,7 @@ func Clone(wdir string, path string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
log.Info("URL:", url)
|
log.Info("URL:", url)
|
||||||
shell.PathRun(fulldir, []string{"git", "clone", url, base})
|
shell.PathRunRealtime(fulldir, []string{"git", "clone", url, base})
|
||||||
if IsDirectory(fullpath) {
|
if IsDirectory(fullpath) {
|
||||||
// clone worked
|
// clone worked
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue