Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Git.commit()


                for (IRepositoryContentProvider provider : generatingProviders) {
                    if (!provider.supportsGeneration())
                        continue;
                    git.add().addFilepattern(getRelativePath(gitRootDir, newFile)).addFilepattern(getRelativePath(gitRootDir, new File(provider.getDefaultIndexName(pretty)))).call();
                }
                git.commit().setMessage("bndtools added bundle : " + getRelativePath(gitRootDir, newFile)).call();
                git.push().setCredentialsProvider(CredentialsProvider.getDefault()).call();

                // Re-read the index
                reset();
                init();
View Full Code Here


        session.addPasswordIdentity("sshd");
        session.auth().verify();

        Git.init().setDirectory(repo).call();
        Git git = Git.open(repo);
        git.commit().setMessage("First Commit").setCommitter("sshd", "sshd@apache.org").call();

        new File("target/git/pgm/test/readme.txt").createNewFile();
        execute(session, "git --git-dir test add readme.txt");

        execute(session, "git --git-dir test commit -m \"readme\"");
View Full Code Here

                .setURI("ssh://sshd@localhost:8001/test.git")
                .setDirectory(dir)
                .call();

        Git git = Git.open(dir);
        git.commit().setMessage("First Commit").setCommitter("sshd", "sshd@apache.org").call();
        git.push().call();

        new File("target/git/local/test.git/readme.txt").createNewFile();
        git.add().addFilepattern("readme.txt").call();
        git.commit().setMessage("readme").setCommitter("sshd", "sshd@apache.org").call();
View Full Code Here

        git.commit().setMessage("First Commit").setCommitter("sshd", "sshd@apache.org").call();
        git.push().call();

        new File("target/git/local/test.git/readme.txt").createNewFile();
        git.add().addFilepattern("readme.txt").call();
        git.commit().setMessage("readme").setCommitter("sshd", "sshd@apache.org").call();
        git.push().call();

        git.pull().setRebase(true).call();

        sshd.stop();
View Full Code Here

        Git git = gitClone(product.getProductInstance(), "git");
        File mf = new File(git.getRepository().getWorkTree(), "atlassian-plugin.xml");
        assertTrue(mf.exists());

        FileUtils.writeStringToFile(mf, FileUtils.readFileToString(mf).replace("Git test", "Git changed test"));
        git.commit()
                .setAll(true)
                .setMessage("changed")
                .setCommitter("admin", "admin@example.com")
                .call();
        git.push()
View Full Code Here

            !status.getChanged().isEmpty() ||
            !status.getMissing().isEmpty() ||
            !status.getRemoved().isEmpty() ||
            !status.getUntracked().isEmpty())
        {
            git.commit().
                setAll(true).
                setAuthor(event.getUserName(), event.getUserEmail()).
                setCommitter("speakeasy", "speakeasy@atlassian.com").
                setMessage(event.getMessage()).
                call();
View Full Code Here

            }

            List<ScmFile> checkedInFiles = Collections.emptyList();
            if ( doCommit )
            {
                RevCommit commitRev = git.commit().setMessage( message ).call();
                getLogger().info( "commit done: " + commitRev.getShortMessage() );
                checkedInFiles = JGitUtils.getFilesInCommit( git.getRepository(), commitRev );
                if ( getLogger().isDebugEnabled() )
                {
                    for ( ScmFile scmFile : checkedInFiles )
View Full Code Here

                reporter.debugText(SHORT_NAME,"no commits found on master. creating initial commit.");
                RefUpdate refUpdate = repo.getRefDatabase().newUpdate(Constants.HEAD, false);
                refUpdate.setForceUpdate(true);
                refUpdate.link(Constants.R_HEADS + context.getMaster());

                git.commit().setMessage("Initial Commit").call();
            }

            //creation of develop
            if (!GitHelper.localBranchExists(git, context.getDevelop()))
            {
View Full Code Here

        }

        addCommand.call();
      }

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

      masterRef = git.getRepository()
          .getRef("master");

      commitId = ObjectId.toString(masterRef.getObjectId());
View Full Code Here

            {
                RefUpdate refUpdate = repo.getRefDatabase().newUpdate(Constants.HEAD, false);
                refUpdate.setForceUpdate(true);
                refUpdate.link(Constants.R_HEADS + context.getMaster());

                git.commit().setMessage("Initial Commit").call();
            }

            //creation of develop
            if (!GitHelper.localBranchExists(git, context.getDevelop()))
            {
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.