Skip to content

Commit

Permalink
Accept 64 character SHA-256 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite committed Jul 1, 2023
1 parent e3269b0 commit 080cfb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/jenkins/plugins/git/GitSCMFileSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static HeadNameResult calculate(@NonNull BranchSpec branchSpec,
prefix = null;
} else {
// check for commit-id
final String regex = "^[a-fA-F0-9]{40}$";
final String regex = "^([a-fA-F0-9]{40}|[a-fA-F0-9]{64})$";
final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(branchSpecExpandedName);

Expand Down

0 comments on commit 080cfb8

Please sign in to comment.