summaryrefslogtreecommitdiff
path: root/gitConfig.go
diff options
context:
space:
mode:
Diffstat (limited to 'gitConfig.go')
-rw-r--r--gitConfig.go18
1 files changed, 5 insertions, 13 deletions
diff --git a/gitConfig.go b/gitConfig.go
index cdafd47..9fc4737 100644
--- a/gitConfig.go
+++ b/gitConfig.go
@@ -79,6 +79,7 @@ func (rs *RepoStatus) readGitConfig() error {
filename := filepath.Join(rs.realPath.String(), "/.git/config")
file, err := os.Open(filename)
if err != nil {
+ log.Log(WARN, "readGitConfig() failed for file:", filename)
filename = filepath.Join(rs.realPath.String(), "../.git/config")
log.Log(WARN, "readGitConfig() trying up one directory instead", filename)
file, err = os.Open(filename)
@@ -224,19 +225,6 @@ func ScanGoSrc() {
}
}
-func ScanGitConfig() {
- /*
- for i, path := range listGitDirectories() {
- filename := filepath.Join(path, ".git/config")
- _, err := readGitConfig(filename)
- if err != nil {
- log.Log(WARN, "repo =", i, path)
- log.Log(WARN, "Error reading .git/config:", err)
- }
- }
- */
-}
-
func (rs *RepoStatus) ScanGoSrc() {
if rs.ReadGoMod() {
log.Log(INFO, "parsed go.mod", rs.realPath.String())
@@ -250,6 +238,10 @@ func (rs *RepoStatus) ScanGoSrc() {
}
}
+func (rs *RepoStatus) Writable() {
+ rs.readOnly.SetText("false")
+}
+
func (rs *RepoStatus) ReadOnly() bool {
if rs.readOnly.String() == "true" {
return true