List of usage examples for org.eclipse.jgit.api PullCommand getRebaseMode
public static BranchRebaseMode getRebaseMode(String branchName, Config config)
From source file:org.eclipse.egit.ui.internal.pull.PullWizardPage.java
License:Open Source License
private void setDefaultUpstreamConfig() { String branchName = Repository.shortenRefName(this.fullBranch); BranchConfig branchConfig = new BranchConfig(repository.getConfig(), branchName); boolean alreadyConfigured = branchConfig.getMerge() != null; BranchRebaseMode config;/*w w w . j ava2 s . c o m*/ if (alreadyConfigured) { config = PullCommand.getRebaseMode(branchName, repository.getConfig()); } else { config = CreateLocalBranchOperation.getDefaultUpstreamConfig(repository, Constants.R_REMOTES + Constants.DEFAULT_REMOTE_NAME + "/" + branchName); //$NON-NLS-1$ } this.upstreamConfig = config; }
From source file:org.eclipse.egit.ui.internal.push.PushBranchPage.java
License:Open Source License
private void setDefaultUpstreamConfig() { if (this.ref != null) { String branchName = Repository.shortenRefName(ref.getName()); BranchConfig branchConfig = new BranchConfig(repository.getConfig(), branchName); boolean alreadyConfigured = branchConfig.getMerge() != null; BranchRebaseMode config;/*from w ww. ja v a 2 s . c om*/ if (alreadyConfigured) { config = PullCommand.getRebaseMode(branchName, repository.getConfig()); } else { config = CreateLocalBranchOperation.getDefaultUpstreamConfig(repository, Constants.R_REMOTES + Constants.DEFAULT_REMOTE_NAME + "/" + branchName); //$NON-NLS-1$ } this.upstreamConfig = config; this.upstreamConfigComponent.setUpstreamConfig(this.upstreamConfig); } }