Skip to content

git: Support version parsing self compiled binary

In fd03f22f (git: Support parsing of release-candidate versions) the expectation was added that git --version output can have 4 components. If the version output has four components, the fourth component must be prefixed with rc.

Locally I run a git compiled from source, where the git version returns: git version 2.28.0.468.g1be91c4e2f. Which breaks git.parseVersion() as the fourth component isn't prefixed with rc.

This change keeps the behaviour that can flag a release as rc, but doesn't return an error when the fourth component isn't rc.

Noted this problem when running the TestPostReceiveWithReferenceTransactionHook test, which succeeds now.

Merge request reports