summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/config.go b/config.go
index fe70446..2fe52f6 100644
--- a/config.go
+++ b/config.go
@@ -139,6 +139,16 @@ func configWrite(filename string, data []byte) error {
log.Warn("open config file :", err)
return err
}
+ if filename == "forge.text" {
+ // add header
+ cfgfile.Write([]byte("# this file is automatically re-generated from forge.pb, however,\n"))
+ cfgfile.Write([]byte("# if you want to edit it by hand, you can:\n"))
+ cfgfile.Write([]byte("# stop forge; remove forge.pb; edit forge.text; start forge\n"))
+ cfgfile.Write([]byte("# this will cause the default behavior to fallback to parsing this file for the config\n"))
+ cfgfile.Write([]byte("\n"))
+ cfgfile.Write([]byte("# this file is intended to be used to customize settings on what\n"))
+ cfgfile.Write([]byte("# git repos you have write access to. That is, where you can run 'git push'\n"))
+ }
cfgfile.Write(data)
return nil
}