diff options
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 |
