Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.SubmoduleUpdateCommand.call()


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());
  }

  @Test
View Full Code Here


    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

    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());
  }

  @Test
View Full Code Here

        .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

          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
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.