From f4fe7b09e262bef6ac943db9bac34954eb4dd1d3 Mon Sep 17 00:00:00 2001 From: Rishabh Budhouliya Date: Thu, 18 Jun 2020 09:25:08 +0530 Subject: [PATCH 1/9] Add performance improvement option to GitSCM descriptor --- src/main/java/hudson/plugins/git/GitSCM.java | 4 +++- src/main/resources/hudson/plugins/git/GitSCM/global.jelly | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/hudson/plugins/git/GitSCM.java b/src/main/java/hudson/plugins/git/GitSCM.java index d10ee3c34c..3e3bd6f800 100644 --- a/src/main/java/hudson/plugins/git/GitSCM.java +++ b/src/main/java/hudson/plugins/git/GitSCM.java @@ -835,7 +835,6 @@ public GitClient createClient(TaskListener listener, EnvVars environment, Run { private boolean useExistingAccountWithSameEmail; // private GitClientType defaultClientType = GitClientType.GITCLI; private boolean showEntireCommitSummaryInChanges; + private boolean enablePerformanceImprovement = true; // By default, performance is enabled in git plugin public DescriptorImpl() { super(GitSCM.class, GitRepositoryBrowser.class); @@ -1606,6 +1606,8 @@ public void setUseExistingAccountWithSameEmail(boolean useExistingAccountWithSam this.useExistingAccountWithSameEmail = useExistingAccountWithSameEmail; } + public boolean isPerformanceEnabled() { return enablePerformanceImprovement; } + /** * Old configuration of git executable - exposed so that we can * migrate this setting to GitTool without deprecation warnings. diff --git a/src/main/resources/hudson/plugins/git/GitSCM/global.jelly b/src/main/resources/hudson/plugins/git/GitSCM/global.jelly index e6b30c008f..ad9485d21e 100644 --- a/src/main/resources/hudson/plugins/git/GitSCM/global.jelly +++ b/src/main/resources/hudson/plugins/git/GitSCM/global.jelly @@ -16,6 +16,9 @@ + + +