Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.SubmoduleUpdateCommand


*/
public class SubmoduleUpdateTest extends RepositoryTestCase {

  @Test
  public void repositoryWithNoSubmodules() throws GitAPIException {
    SubmoduleUpdateCommand command = new SubmoduleUpdateCommand(db);
    Collection<String> modules = command.call();
    assertNotNull(modules);
    assertTrue(modules.isEmpty());
  }
View Full Code Here


        db.getWorkTree(), Constants.DOT_GIT_MODULES), db.getFS());
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_PATH, path);
    modulesConfig.save();

    SubmoduleUpdateCommand command = new SubmoduleUpdateCommand(db);
    Collection<String> updated = command.call();
    assertNotNull(updated);
    assertEquals(1, updated.size());
    assertEquals(path, updated.iterator().next());

    SubmoduleWalk generator = SubmoduleWalk.forIndex(db);
View Full Code Here

    String update = "rebase";
    modulesConfig.setString(ConfigConstants.CONFIG_SUBMODULE_SECTION, path,
        ConfigConstants.CONFIG_KEY_UPDATE, update);
    modulesConfig.save();

    SubmoduleUpdateCommand command = new SubmoduleUpdateCommand(db);
    Collection<String> updated = command.call();
    assertNotNull(updated);
    assertTrue(updated.isEmpty());
  }
View Full Code Here

    Repository subRepo = Git.init().setBare(false)
        .setDirectory(new File(db.getWorkTree(), path)).call()
        .getRepository();
    assertNotNull(subRepo);

    SubmoduleUpdateCommand command = new SubmoduleUpdateCommand(db);
    Collection<String> updated = command.call();
    assertNotNull(updated);
    assertTrue(updated.isEmpty());
  }
View Full Code Here

          for (String path : paths)
            init.addPath(path);
          init.call();
          pm.worked(1);

          SubmoduleUpdateCommand update = git.submoduleUpdate();
          for (String path : paths)
            update.addPath(path);
          update.setProgressMonitor(new EclipseGitProgressTransformer(
              new SubProgressMonitor(pm, 2)));
          updated = update.call();
          pm.worked(1);
          SubProgressMonitor refreshMonitor = new SubProgressMonitor(
              pm, 1);
          refreshMonitor.beginTask("", updated.size()); //$NON-NLS-1$
          for (String path : updated) {
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.SubmoduleUpdateCommand

Copyright © 2018 www.massapicom. 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.