Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Git contains some multiline headers, including
gpgsig
,gpgsig-sha256
, andmergetag
headers. These headers start with a normal line of data and then are continued after a newline by indentation with a single space, which is stripped when computing the body.Our header parsing for commits could misparse these because we use
strings.Fields
, which strips leading space. As a result, if the mergetag message contains a line starting with "tree " and then a non-hex character, we'd fail parsing since we'd attempt to parse it as a tree header. Let's fix this by usingstrings.Split
instead, which doesn't strip space and therefore won't try to misparse this.The fake commit is synthesized from be122abe4bcd6d39b37892daae28c8bf5e4030fc in the Linux kernel repository. Identifying information and most of the text are removed for privacy and license reasons.