aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format')
-rw-r--r--plumbing/format/diff/unified_encoder.go2
-rw-r--r--plumbing/format/gitattributes/pattern.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/format/diff/unified_encoder.go b/plumbing/format/diff/unified_encoder.go
index 8bd6d8a..169242d 100644
--- a/plumbing/format/diff/unified_encoder.go
+++ b/plumbing/format/diff/unified_encoder.go
@@ -94,7 +94,7 @@ func (e *UnifiedEncoder) printMessage(message string) {
isEmpty := message == ""
hasSuffix := strings.HasSuffix(message, "\n")
if !isEmpty && !hasSuffix {
- message = message + "\n"
+ message += "\n"
}
e.buf.WriteString(message)
diff --git a/plumbing/format/gitattributes/pattern.go b/plumbing/format/gitattributes/pattern.go
index c5ca0c7..d961aba 100644
--- a/plumbing/format/gitattributes/pattern.go
+++ b/plumbing/format/gitattributes/pattern.go
@@ -66,7 +66,7 @@ func (p *pattern) Match(path []string) bool {
doublestar = true
}
- switch true {
+ switch {
case strings.Contains(pattern[0], "**"):
return false