Fix GIT_DIFF_TREE_PATTERN wrt number of status letters #46
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.
Hi,
we recently saw this failure in our GoCD Pipeline:
There was a similar issue reported here: ashwanthkumar/gocd-build-github-pull-requests#123 In that case, only 3 Ms were part of the response line, in our case it's 5.
From our investigation it looks like the executed git diff-tree command is
Now according to the git documentation documentation
So if a revision has X parents, X status letters are in that line. In that case, the git pattern used here doesn't work anymore since it only accepts up to 3 status letters.
The fix in this PRs is to group anything until the first occurance of a whitespace, then group everything following that whitespace.
Tested with some quick main method: