aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/config/encoder.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-19 01:08:41 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-19 01:08:41 +0200
commitacb1a5f7a47e4759bbe1592a0a58571bda6289e7 (patch)
tree20342aa8aa67aefe00000f1e3770638675905634 /plumbing/format/config/encoder.go
parent330a45a58eef95095d9fb7343f8daeb8c408e4f5 (diff)
downloadgo-git-acb1a5f7a47e4759bbe1592a0a58571bda6289e7.tar.gz
plumbing: format config, escape back slash
Diffstat (limited to 'plumbing/format/config/encoder.go')
-rw-r--r--plumbing/format/config/encoder.go2
1 files changed, 1 insertions, 1 deletions
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"
}