summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-15 09:12:47 -0600
committerJeff Carr <[email protected]>2024-11-15 09:12:47 -0600
commit2e8a1d479350270f89385fde00e68f013a18eacd (patch)
tree0aed33b86756e939e4e3834ded8694cae28834a1
parent4ab00cce021217a63db9157892006646e2496152 (diff)
use more realtime output for git clonev0.22.14
-rw-r--r--common.go2
-rw-r--r--git.go2
-rw-r--r--new.go9
3 files changed, 9 insertions, 4 deletions
diff --git a/common.go b/common.go
index 74f57f4..34f76ea 100644
--- a/common.go
+++ b/common.go
@@ -7,8 +7,8 @@ import (
"strings"
"unicode"
- "go.wit.com/log"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/log"
)
// reports externally if something has changed
diff --git a/git.go b/git.go
index e87860e..cef5d05 100644
--- a/git.go
+++ b/git.go
@@ -10,8 +10,8 @@ import (
"io/ioutil"
- "go.wit.com/log"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/log"
)
func (rs *RepoStatus) GetCurrentBranchName() string {
diff --git a/new.go b/new.go
index fd1afef..7e4b545 100644
--- a/new.go
+++ b/new.go
@@ -154,7 +154,12 @@ func Clone(wdir string, path string) error {
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) {
// clone worked
return nil
@@ -166,7 +171,7 @@ func Clone(wdir string, path string) error {
return err
}
log.Info("URL:", url)
- shell.PathRun(fulldir, []string{"git", "clone", url, base})
+ shell.PathRunRealtime(fulldir, []string{"git", "clone", url, base})
if IsDirectory(fullpath) {
// clone worked
return nil