Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
plumbing/format: simplify code
Browse files Browse the repository at this point in the history
Just a bit easier to read, in my opinion.

Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
(cherry picked from commit 91d314c)
  • Loading branch information
muesli authored and mcuadros committed Jul 29, 2019
1 parent 28675ba commit bfe45ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plumbing/format/diff/unified_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion plumbing/format/gitattributes/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (p *pattern) Match(path []string) bool {
doublestar = true
}

switch true {
switch {
case strings.Contains(pattern[0], "**"):
return false

Expand Down

0 comments on commit bfe45ee

Please sign in to comment.