aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/diff
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-07-21 06:15:34 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2019-07-29 17:34:12 +0200
commitbfe45eef34bfad73dc9c5255ac8f06ae19501554 (patch)
tree7693dfd33a52bbe1cb724e949a219afa7f0bda5b /plumbing/format/diff
parent28675baffe8f5590401a96c5a0cb4fe0fc6f4da7 (diff)
downloadgo-git-bfe45eef34bfad73dc9c5255ac8f06ae19501554.tar.gz
plumbing/format: simplify code
Just a bit easier to read, in my opinion. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit 91d314ce8f13eff06fd4af8b869cee5a3e2ab014)
Diffstat (limited to 'plumbing/format/diff')
-rw-r--r--plumbing/format/diff/unified_encoder.go2
1 files changed, 1 insertions, 1 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)