aboutsummaryrefslogtreecommitdiff
path: root/object/signed/commit/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'object/signed/commit/parse.go')
-rw-r--r--object/signed/commit/parse.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/object/signed/commit/parse.go b/object/signed/commit/parse.go
index 1714327f..fa498093 100644
--- a/object/signed/commit/parse.go
+++ b/object/signed/commit/parse.go
@@ -25,6 +25,7 @@ func Parse(body []byte) (*Commit, error) {
rel := bytes.IndexByte(body[i:], '\n')
next := len(body)
+
lineEnd := len(body)
if rel >= 0 {
lineEnd = i + rel
@@ -63,6 +64,7 @@ func Parse(body []byte) (*Commit, error) {
for i < len(body) {
rel := bytes.IndexByte(body[i:], '\n')
next = len(body)
+
lineEnd = len(body)
if rel >= 0 {
lineEnd = i + rel
@@ -70,6 +72,7 @@ func Parse(body []byte) (*Commit, error) {
}
contStart := i
+
cont := body[contStart:lineEnd]
if len(cont) == 0 || cont[0] != ' ' {
break