aboutsummaryrefslogtreecommitdiff
path: root/object/commit/parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'object/commit/parse.go')
-rw-r--r--object/commit/parse.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/object/commit/parse.go b/object/commit/parse.go
index 090cf356..20353e14 100644
--- a/object/commit/parse.go
+++ b/object/commit/parse.go
@@ -19,6 +19,7 @@ func Parse(body []byte, objectFormat id.ObjectFormat) (*Commit, error) {
i := 0
state := parseStateTree
sawHeaderEnd := false
+
for i < len(body) {
lineStart := i
@@ -32,6 +33,7 @@ func Parse(body []byte, objectFormat id.ObjectFormat) (*Commit, error) {
if len(line) == 0 {
sawHeaderEnd = true
+
break
}