Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.StoredConfig.unset()


    if (pushBranchPage.isRebaseSelected()) {
      config.setBoolean(ConfigConstants.CONFIG_BRANCH_SECTION,
          localBranchName, ConfigConstants.CONFIG_KEY_REBASE, true);
    } else {
      // Make sure we overwrite any previous configuration
      config.unset(ConfigConstants.CONFIG_BRANCH_SECTION, localBranchName,
          ConfigConstants.CONFIG_KEY_REBASE);
    }

    config.save();
  }
View Full Code Here


    FetchNode node = getSelectedNodes(event).get(0);
    RemoteNode remote = (RemoteNode) node.getParent();

    StoredConfig config = node.getRepository().getConfig();
    String fetchUrl = config.getString(REMOTE, remote.getObject(), URL);
    config.unset(REMOTE, remote.getObject(), FETCH);
    config.unset(REMOTE, remote.getObject(), URL);
    // the push URL may still be needed for fetch
    if (fetchUrl != null) {
      boolean hasPush = config.getStringList(REMOTE, remote.getObject(),
          PUSH).length > 0;
View Full Code Here

    RemoteNode remote = (RemoteNode) node.getParent();

    StoredConfig config = node.getRepository().getConfig();
    String fetchUrl = config.getString(REMOTE, remote.getObject(), URL);
    config.unset(REMOTE, remote.getObject(), FETCH);
    config.unset(REMOTE, remote.getObject(), URL);
    // the push URL may still be needed for fetch
    if (fetchUrl != null) {
      boolean hasPush = config.getStringList(REMOTE, remote.getObject(),
          PUSH).length > 0;
      if (hasPush) {
View Full Code Here

public class DeletePushCommand extends RepositoriesViewCommandHandler<PushNode> {
  public Object execute(ExecutionEvent event) throws ExecutionException {
    PushNode node = getSelectedNodes(event).get(0);
    RemoteNode remote = (RemoteNode) node.getParent();
    StoredConfig config = node.getRepository().getConfig();
    config.unset("remote", remote.getObject(), "pushurl"); //$NON-NLS-1$ //$NON-NLS-2$
    config.unset("remote", remote.getObject(), "push"); //$NON-NLS-1$ //$NON-NLS-2$
    try {
      config.save();
    } catch (IOException e1) {
      Activator.handleError(e1.getMessage(), e1, true);
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {
    PushNode node = getSelectedNodes(event).get(0);
    RemoteNode remote = (RemoteNode) node.getParent();
    StoredConfig config = node.getRepository().getConfig();
    config.unset("remote", remote.getObject(), "pushurl"); //$NON-NLS-1$ //$NON-NLS-2$
    config.unset("remote", remote.getObject(), "push"); //$NON-NLS-1$ //$NON-NLS-2$
    try {
      config.save();
    } catch (IOException e1) {
      Activator.handleError(e1.getMessage(), e1, true);
    }
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.