Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2017-03-06 20:33:44 +0300
committerAhmad Sherif <me@ahmadsherif.com>2017-03-06 20:57:56 +0300
commit511d532852a5df95649a39228b476ec638a487f9 (patch)
treed7cd9f7cac653b7b2db9a96a99c6bc1eae3b4b46
parentecd3580aafc1a05fef13267eddad69e12ff9c56c (diff)
Only consume chunks if len(line) > 0
-rw-r--r--internal/diff/diff.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/diff/diff.go b/internal/diff/diff.go
index c5d2f5573..6b17b4b75 100644
--- a/internal/diff/diff.go
+++ b/internal/diff/diff.go
@@ -65,10 +65,11 @@ func (parser *Parser) Parse() bool {
return false
}
- if len(line) < 10 {
+ if len(line) > 0 && len(line) < 10 {
consumeChunkLine(parser.reader, parser.currentDiff)
- return true
}
+
+ return true
} else if err != nil {
parser.err = fmt.Errorf("ParseDiffOutput: Unexpected error while peeking: %v", err)
return false