mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-06 05:29:36 +02:00
Merge tag '3.7.6' into develop
Release version 3.7.6
This commit is contained in:
@@ -59,7 +59,12 @@ public class GitUserAgentProvider implements UserAgentProvider {
|
||||
.basicAuthenticationCharset(Charsets.UTF_8)
|
||||
.build();
|
||||
|
||||
private static final String PREFIX_GOGIT = "go-git/";
|
||||
|
||||
@VisibleForTesting
|
||||
static final UserAgent GOGIT = UserAgent.scmClient("go-git")
|
||||
.basicAuthenticationCharset(Charsets.UTF_8)
|
||||
.build();
|
||||
|
||||
|
||||
@Override
|
||||
@@ -74,6 +79,8 @@ public class GitUserAgentProvider implements UserAgentProvider {
|
||||
return GIT_LFS;
|
||||
} else if (isGit(lowerUserAgent)) {
|
||||
return GIT;
|
||||
} else if (isGoGit(lowerUserAgent)) {
|
||||
return GOGIT;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -98,4 +105,6 @@ public class GitUserAgentProvider implements UserAgentProvider {
|
||||
private boolean isGit(String userAgent) {
|
||||
return userAgent.startsWith(PREFIX_REGULAR);
|
||||
}
|
||||
|
||||
private boolean isGoGit(String userAgent) { return userAgent.startsWith(PREFIX_GOGIT); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user