aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/format/config/decoder.go4
-rw-r--r--plumbing/format/config/encoder.go2
2 files changed, 2 insertions, 4 deletions
diff --git a/plumbing/format/config/decoder.go b/plumbing/format/config/decoder.go
index c6ad3d8..0f02ce1 100644
--- a/plumbing/format/config/decoder.go
+++ b/plumbing/format/config/decoder.go
@@ -2,7 +2,6 @@ package config
import (
"io"
- "os"
"github.com/src-d/gcfg"
)
@@ -34,6 +33,5 @@ func (d *Decoder) Decode(config *Config) error {
config.AddOption(s, ss, k, v)
return nil
}
-
- return gcfg.ReadWithCallback(io.TeeReader(d, os.Stdout), cb)
+ return gcfg.ReadWithCallback(d, cb)
}
diff --git a/plumbing/format/config/encoder.go b/plumbing/format/config/encoder.go
index 76d73fd..6d17a5a 100644
--- a/plumbing/format/config/encoder.go
+++ b/plumbing/format/config/encoder.go
@@ -63,7 +63,7 @@ func (e *Encoder) encodeSubsection(sectionName string, s *Subsection) error {
func (e *Encoder) encodeOptions(opts Options) error {
for _, o := range opts {
pattern := "\t%s = %s\n"
- if strings.Index(o.Value, "\\") == -1 {
+ if strings.Index(o.Value, "\\") != -1 {
pattern = "\t%s = %q\n"
}