aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Pronk <private>2021-07-24 12:54:53 +1200
committerAdrian Pronk <private>2021-07-24 12:54:53 +1200
commit437ae96746723ceac4cf6bc5bb730b4f848b79ad (patch)
tree70edfe7dd19c424d53e0e3dde3fa5c9dbb1ad544
parent9acce5071f2093d02eb8a485fbe2c8ff6e92c958 (diff)
downloadgo-git-437ae96746723ceac4cf6bc5bb730b4f848b79ad.tar.gz
plumbing: config, remove duplicated character in set
-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 93dad1a..62921e0 100644
--- a/plumbing/format/config/encoder.go
+++ b/plumbing/format/config/encoder.go
@@ -59,7 +59,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.ContainsAny(o.Value, `"#\"`) || strings.HasPrefix(o.Value, " ") || strings.HasSuffix(o.Value, " ") {
+ if strings.ContainsAny(o.Value, `"#\`) || strings.HasPrefix(o.Value, " ") || strings.HasSuffix(o.Value, " ") {
pattern = "\t%s = %q\n"
}