Package org.eclipse.jgit.api

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


      FileResource<?> gitDir = project.getProjectRoot().getChildDirectory(".git").reify(FileResource.class);
      if(!gitDir.exists())
      {
         InitCommand init = Git.init();
         init.setDirectory(project.getProjectRoot().getUnderlyingResourceObject());
         init.call();
      }

      return true;
   }
View Full Code Here


      log("Initializing repository at " + destination);
    }
    try {
      InitCommand init = Git.init();
      init.setBare(bare).setDirectory(destination);
      init.call();
    } catch (Exception e) {
      throw new BuildException("Could not initialize repository", e);
    }
  }
}
View Full Code Here

         InitCommand init = Git.init();
         init.setDirectory(project.getProjectRoot().getUnderlyingResourceObject());

         try
         {
            init.call();
         }
         catch (GitAPIException e)
         {
         }
      }
View Full Code Here

  protected void run() throws Exception {
    InitCommand command = Git.init();
    command.setBare(bare);
    if (gitdir != null)
      command.setDirectory(new File(gitdir));
    Repository repository = command.call().getRepository();
    outw.println(MessageFormat.format(
        CLIText.get().initializedEmptyGitRepositoryIn, repository
            .getDirectory().getAbsolutePath()));
  }
}
View Full Code Here

  public void testGetGitDirWorkspaceIsInRepo() throws Exception {
    InitCommand command = new InitCommand();
    File workspace = getWorkspaceRoot();
    File parent = workspace.getParentFile();
    command.setDirectory(parent);
    Repository repository = command.call().getRepository();
    assertNotNull(repository);

    createWorkspace(SimpleMetaStore.DEFAULT_WORKSPACE_NAME);
    JSONObject project = createProjectOrLink(workspaceLocation, getMethodName().concat("Project"), null);
    String location = project.getString(ProtocolConstants.KEY_CONTENT_LOCATION);
View Full Code Here

    Repository repository = null;
    try {
      InitCommand command = new InitCommand();
      File directory = new File(clone.getContentLocation());
      command.setDirectory(directory);
      repository = command.call().getRepository();
      Git git = new Git(repository);

      // configure the repo
      GitCloneHandlerV1.doConfigureClone(git, user, gitUserName, gitUserMail);
View Full Code Here

         InitCommand init = Git.init();
         init.setDirectory(rootDirectory.getUnderlyingResourceObject());

         try
         {
            gitUtils.close(init.call());
         }
         catch (GitAPIException e)
         {
         }
      }
View Full Code Here

         InitCommand init = Git.init();
         init.setDirectory(rootDirectory.getUnderlyingResourceObject());

         try
         {
            gitUtils.close(init.call());
         }
         catch (GitAPIException e)
         {
         }
      }
View Full Code Here

        {
          logger.info("Creating Git repository at " + gitdir);
          gitdir.mkdirs();
          InitCommand initCommand = Git.init();
          initCommand.setDirectory(gitdir);
          initCommand.call();
        }
      } catch (IOException ex)
      {
        logger.severe("Invalid git directory: " + ex.getMessage());
        return;
View Full Code Here

         InitCommand init = Git.init();
         init.setDirectory(project.getProjectRoot().getUnderlyingResourceObject());

         try
         {
            GitUtils.close(init.call());
         }
         catch (GitAPIException e)
         {
         }
      }
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.