Examples of BranchConfig


Examples of org.eclipse.jgit.lib.BranchConfig

  private void setRemoteConfigs() {
    remoteSelectionCombo.setItems(remoteConfigs);
    if (this.ref != null) {
      String branchName = Repository.shortenRefName(this.ref.getName());
      BranchConfig branchConfig = new BranchConfig(
          repository.getConfig(), branchName);
      String remoteName = branchConfig.getRemote();
      if (remoteName != null) {
        for (RemoteConfig rc : remoteConfigs) {
          if (remoteName.equals(rc.getName()))
            remoteSelectionCombo.setSelectedRemote(rc);
        }
View Full Code Here

Examples of org.eclipse.jgit.lib.BranchConfig

  }

  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;
      UpstreamConfig config;
      if (alreadyConfigured) {
        boolean rebase = branchConfig.isRebase();
        config = rebase ? UpstreamConfig.REBASE : UpstreamConfig.MERGE;
      } else {
        config = UpstreamConfig.getDefault(repository, Constants.R_REMOTES
            + Constants.DEFAULT_REMOTE_NAME + "/" + branchName); //$NON-NLS-1$
      }
View Full Code Here

Examples of org.eclipse.jgit.lib.BranchConfig

  private String getSuggestedBranchName() {
    if (ref != null) {
      StoredConfig config = repository.getConfig();
      String branchName = Repository.shortenRefName(ref.getName());

      BranchConfig branchConfig = new BranchConfig(config, branchName);
      String merge = branchConfig.getMerge();
      if (!branchConfig.isRemoteLocal() && merge != null
          && merge.startsWith(Constants.R_HEADS))
        return Repository.shortenRefName(merge);

      return branchName;
    } else {
View Full Code Here

Examples of org.eclipse.jgit.lib.BranchConfig

    }
  }

  private boolean hasDifferentUpstreamConfiguration() {
    String branchName = Repository.shortenRefName(ref.getName());
    BranchConfig branchConfig = new BranchConfig(repository.getConfig(),
        branchName);

    String remote = branchConfig.getRemote();
    // No upstream config -> don't show warning
    if (remote == null)
      return false;
    if (!remote.equals(remoteConfig.getName()))
      return true;

    String merge = branchConfig.getMerge();
    if (merge == null || !merge.equals(getFullRemoteReference()))
      return true;

    boolean rebase = branchConfig.isRebase();
    if (rebase != isRebaseSelected())
      return true;

    return false;
  }
View Full Code Here

Examples of org.eclipse.jgit.lib.BranchConfig

    if (count == 0)
      return new ObjectIdRef.Unpeeled(Storage.LOOSE, commit.getName(), commit);
    else if (count == 1)
      return commit.getRef(0);
    else {
      BranchConfig branchConfig = new BranchConfig(repository.getConfig(), currentBranch);
      String trackingBranch = branchConfig.getTrackingBranch();
      Ref remoteRef = null;

      for (int i = 0; i < count; i++) {
        Ref ref = commit.getRef(i);
        if (trackingBranch != null && trackingBranch.equals(ref.getName()))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.