diff options
| author | Jeff Carr <[email protected]> | 2024-11-08 06:43:33 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-08 06:43:33 -0600 |
| commit | 55acea0bd769132db7bf420fef3b94fa21ca5f83 (patch) | |
| tree | d43fb2b485cf0b1439a48037cf129a76e1d53ad0 /gitConfig.go | |
| parent | 29545d3f048ccb148429725d76d0894336985c2b (diff) | |
use go-cmd/cmdv0.22.12
Diffstat (limited to 'gitConfig.go')
| -rw-r--r-- | gitConfig.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gitConfig.go b/gitConfig.go index b2c2af9..029c473 100644 --- a/gitConfig.go +++ b/gitConfig.go @@ -11,6 +11,7 @@ import ( // GitConfig represents the parsed .git/config data // type GitConfig map[string]map[string]string +// TODO: switch to protobuf type remote struct { url string @@ -220,21 +221,16 @@ func (rs *RepoStatus) GitURL() string { } func (rs *RepoStatus) GitLsFiles() (bool, string) { - err, output := rs.RunCmd([]string{"git", "ls-files"}) - if err != nil { - log.Warn("git ls-files failed err =", err) + r := rs.Run([]string{"git", "ls-files"}) + output := strings.Join(r.Stdout, "\n") + if r.Error != nil { + log.Warn("git ls-files failed err =", r.Error) log.Warn("git ls-files failed output =", output) return false, output } return true, output } -/* -func (rs *RepoStatus) Writable() { - rs.readOnly.SetText("false") -} -*/ - func (rs *RepoStatus) ReadOnly() bool { if rs.readOnly.String() == "true" { return true |
