12 | * This is primarily done to eliminate the "advanced" section completely in favor
13 | * of the extension list.
14 | *
15 | * @author Kohsuke Kawaguchi
16 | */
17 | @Restricted(NoExternalUse.class)
18 | public abstract class FakeGitSCMExtension extends GitSCMExtension {
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/hudson/plugins/git/extensions/GitClientConflictException.java:
--------------------------------------------------------------------------------
1 | package hudson.plugins.git.extensions;
2 |
3 | /**
4 | * @author Nicolas De Loof
5 | */
6 | public class GitClientConflictException extends Exception {
7 | }
8 |
--------------------------------------------------------------------------------
/src/main/java/hudson/plugins/git/extensions/GitClientType.java:
--------------------------------------------------------------------------------
1 | package hudson.plugins.git.extensions;
2 |
3 | /**
4 | * @author Nicolas De Loof
5 | */
6 | public enum GitClientType {
7 | JGIT {
8 | @Override
9 | public GitClientType combine(GitClientType c) throws GitClientConflictException {
10 | if (c == GITCLI) throw new GitClientConflictException();
11 | return this;
12 | }
13 | }, GITCLI {
14 | @Override
15 | public GitClientType combine(GitClientType c) throws GitClientConflictException {
16 | if (c == JGIT) throw new GitClientConflictException();
17 | return this;
18 | }
19 | }, ANY {
20 | @Override
21 | public GitClientType combine(GitClientType c) {
22 | return c;
23 | }
24 | };
25 |
26 | public abstract GitClientType combine(GitClientType c) throws GitClientConflictException;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/hudson/plugins/git/extensions/GitSCMExtensionDescriptor.java:
--------------------------------------------------------------------------------
1 | package hudson.plugins.git.extensions;
2 |
3 | import hudson.DescriptorExtensionList;
4 | import hudson.model.Descriptor;
5 | import hudson.plugins.git.GitSCM;
6 | import jenkins.model.Jenkins;
7 |
8 | /**
9 | * @author Kohsuke Kawaguchi
10 | */
11 | public abstract class GitSCMExtensionDescriptor extends Descriptor