Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.RepositoryBuilder


   */
  public static Git open(File dir, FS fs) throws IOException {
    RepositoryCache.FileKey key;

    key = RepositoryCache.FileKey.lenient(dir, fs);
    return wrap(new RepositoryBuilder().setFS(fs).setGitDir(key.getFile())
        .setMustExist(true).build());
  }
View Full Code Here


    File subWorkTree = new File(parent, path);
    if (!subWorkTree.isDirectory())
      return null;
    File workTree = new File(parent, path);
    try {
      return new RepositoryBuilder() //
          .setMustExist(true) //
          .setFS(FS.DETECTED) //
          .setWorkTree(workTree) //
          .build();
    } catch (RepositoryNotFoundException e) {
View Full Code Here

     */
    public static JGitFlow get(File projectDir) throws JGitFlowIOException
    {
        try
        {
            RepositoryBuilder rb = new RepositoryBuilder()
                    .readEnvironment()
                    .findGitDir(projectDir);

            File gitDir = rb.getGitDir();
            Git gitRepo = Git.open(gitDir);
            GitFlowConfiguration gfConfig = new GitFlowConfiguration(gitRepo);

            return new JGitFlow(gitRepo, gfConfig, new JGitFlowReporter());
        }
View Full Code Here

    public static boolean isInitialized(File dir)
    {
        boolean inited = false;
        try
        {
            RepositoryBuilder rb = new RepositoryBuilder()
                    .readEnvironment()
                    .findGitDir(dir);
           
            File gitDir = rb.getGitDir();
            if (gitDir != null)
            {
                Git gitRepo = Git.open(gitDir);
                GitFlowConfiguration gfConfig = new GitFlowConfiguration(gitRepo);
                inited = gfConfig.gitFlowIsInitialized();
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.RepositoryBuilder

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.