Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.SubmoduleAddCommand


  public void execute(IProgressMonitor monitor) throws CoreException {
    IWorkspaceRunnable action = new IWorkspaceRunnable() {

      public void run(IProgressMonitor pm) throws CoreException {
        final SubmoduleAddCommand add = Git.wrap(repo).submoduleAdd();
        add.setProgressMonitor(new EclipseGitProgressTransformer(pm));
        add.setPath(path);
        add.setURI(uri);
        try {
          Repository subRepo = add.call();
          if (subRepo != null) {
            subRepo.close();
            repo.notifyIndexChanged();
          }
        } catch (GitAPIException e) {
View Full Code Here


    refreshAndWait();
    assertHasRepo(repositoryFile);
    Repository repo = lookupRepository(repositoryFile);
    ObjectId repoHead = repo.resolve(Constants.HEAD);

    SubmoduleAddCommand command = new SubmoduleAddCommand(repo);
    String path = "sub";
    command.setPath(path);
    String uri = new URIish(repo.getDirectory().toURI().toString())
        .toString();
    command.setURI(uri);
    Repository subRepo = command.call();
    assertNotNull(subRepo);
    subRepo.close();

    Ref head = subRepo.getRef(Constants.HEAD);
    assertNotNull(head);
View Full Code Here

    assertProjectExistence(PROJ1, true);
    refreshAndWait();
    assertHasRepo(repositoryFile);
    Repository repo = lookupRepository(repositoryFile);

    SubmoduleAddCommand command = new SubmoduleAddCommand(repo);
    String path = "sub";
    command.setPath(path);
    String uri = new URIish(repo.getDirectory().toURI().toString())
        .toString();
    command.setURI(uri);
    Repository subRepo = command.call();
    assertNotNull(subRepo);
    subRepo.close();

    String newUri = "git://server/repo.git";
    File modulesFile = new File(repo.getWorkTree(),
View Full Code Here

TOP

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

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.