Package org.eclipse.jgit.api

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


      for (String s : status.getUntracked()) {
        getLog().info("Adding file " + s);
        addCommand.addFilepattern(s);
      }

      addCommand.call();
    }

    git.commit().setAll(true).setMessage(versionDescription).call();

    String commitId = ObjectId.toString(git.getRepository()
View Full Code Here


      for (String s : status.getUntracked()) {
        log("Adding file %s", s);
        addCommand.addFilepattern(s);
      }

      addCommand.call();
    }

    log("Committing");

    try {
View Full Code Here

            return null;
        }
        file.mkdirs();
        String filePattern = getFilePattern(path);
        AddCommand add = git.add().addFilepattern(filePattern).addFilepattern(".");
        add.call();

        CommitCommand commit = git.commit().setAll(true).setAuthor(personIdent).setMessage(commitMessage);
        RevCommit revCommit = commitThenPush(git, branch, commit);
        return createCommitInfo(revCommit);
    }
View Full Code Here

        IOHelper.write(file, contents);

        String filePattern = getFilePattern(path);
        AddCommand add = git.add().addFilepattern(filePattern).addFilepattern(".");
        add.call();

        CommitCommand commit = git.commit().setAll(true).setAuthor(personIdent).setMessage(commitMessage);
        RevCommit revCommit = commitThenPush(git, branch, commit);
        return createCommitInfo(revCommit);
    }
View Full Code Here

     */
    public void addFile(File file) throws IOException, GitAPIException {
        String path = Files.getRelativePath(rootDir, file);
        String filePattern = getFilePattern(path);
        AddCommand add = git.add().addFilepattern(filePattern).addFilepattern(".");
        add.call();
        requiresCommit = true;
    }

    // Properties
    //-------------------------------------------------------------------------
View Full Code Here

    Git git = Git.open(dir);
    AddCommand add = git.add();
    for (String file : files) {
      add.addFilepattern(file);
    }
    add.call();

    // execute the commit
    CommitCommand commit = git.commit();
    commit.setMessage(message);
    RevCommit revCommit = commit.call();
View Full Code Here

        if (newProject.idea.includeClasspath()) {
            // MOXIE_HOME relative dependencies in .iml
            add.addFilepattern("*.iml");
        }
      try {
        add.call();
        CommitCommand commit = git.commit();
        PersonIdent moxie = new PersonIdent("Moxie", "moxie@localhost");
        commit.setAuthor(moxie);
        commit.setCommitter(moxie);
        commit.setMessage("Project structure created");
View Full Code Here

                        pomPath = StringUtils.replace(pomPath,"\\","/");   
                    }
                   
                    add.addFilepattern(pomPath);
                }
                add.call();
                git.commit().setMessage(message).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.