Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
867: Your git version is: 2.30.0.284...., which is not a known ...
Reviewed-by: jvernee
  • Loading branch information
Martin Buchholz authored and JornVernee committed Jan 17, 2021
1 parent 06e31a8 commit c972718
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -32,7 +32,7 @@
public class GitVersion {

private static final Pattern versionPattern = Pattern.compile(
"git version (?<versionString>.*(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<security>\\d+).*)");
"git version (?<versionString>.*?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<security>\\d+).*)");
private static final GitVersion UNKNOWN = new GitVersion("UNKNOWN", -1, -1, -1);

private final String versionString;
Expand Down
Expand Up @@ -43,6 +43,9 @@ static Stream<Arguments> supportedVersions() {
arguments("git version 2.25.3", 2, 25, 3),
arguments("git version 2.26.1", 2, 26, 1),

arguments("git version 2.30.0.284", 2, 30, 0),
arguments("git version 2.30.0.284.cafebabe-yoyodyne", 2, 30, 0),

arguments("git version 2.27.0.windows.1", 2, 27, 0)
);
}
Expand All @@ -62,6 +65,9 @@ void testSupportedVersions(String versionsString, int major, int minor, int secu

static Stream<Arguments> unsupportedVersions() {
return Stream.of(
// check for "git 10 bug"
arguments("git version 10.1.12", 10, 1, 12),

arguments("git version 2.17.4", 2, 17, 4),
arguments("git version 2.18.3", 2, 18, 3),
arguments("git version 2.19.4", 2, 19, 4),
Expand Down

1 comment on commit c972718

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.