Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.Status


    Repository subModRepo = generator.getRepository();
    addRepoToClose(subModRepo);
    assertNotNull(subModRepo);
    assertEquals(commit, repo.resolve(Constants.HEAD));

    Status status = Git.wrap(db).status().call();
    assertTrue(status.getAdded().contains(Constants.DOT_GIT_MODULES));
    assertTrue(status.getAdded().contains(path));
  }
View Full Code Here


            .getString(ConfigConstants.CONFIG_REMOTE_SECTION,
                Constants.DEFAULT_REMOTE_NAME,
                ConfigConstants.CONFIG_KEY_URL));
    assertEquals(commit, repo.resolve(Constants.HEAD));

    Status status = Git.wrap(db).status().call();
    assertTrue(status.getAdded().contains(Constants.DOT_GIT_MODULES));
    assertTrue(status.getAdded().contains(path));
  }
View Full Code Here

    assertNull(gen.getConfigUrl());
    assertNull(gen.getModulesPath());
    assertNull(gen.getModulesUpdate());
    assertNull(gen.getModulesUrl());
    assertNull(gen.getRepository());
    Status status = Git.wrap(db).status().call();
    assertTrue(!status.isClean());
    assertFalse(gen.next());
  }
View Full Code Here

    {
        try
        {
            Git git = flow.git();

            Status status = git.status().call();
            if (!status.isClean())
            {
                git.add().addFilepattern(".").call();
                git.commit().setMessage(commitMessage).call();
            }
        }
View Full Code Here

    public void commitAllChanges(final String message) {
        final Repository repository = getRepository();
        try {
            final Git git = new Git(repository);
            git.add().addFilepattern(".").call();
            final Status status = git.status().call();
            if (status.getChanged().size() > 0 || status.getAdded().size() > 0
                    || status.getModified().size() > 0
                    || status.getRemoved().size() > 0) {
                final RevCommit rev = git.commit().setAll(true)
                        .setCommitter(person).setAuthor(person)
                        .setMessage(message).call();
                LOGGER.info("Git commit " + rev.getName() + " [" + message
                        + "]");
View Full Code Here

                add.addFilepattern( file.getAbsolutePath() );
            }
        }
        add.call();
       
        Status status = git.status().call();

        Set<String> allInIndex = new HashSet<String>();
        allInIndex.addAll( status.getAdded() );
        allInIndex.addAll( status.getChanged() );

        // System.out.println("All in index: "+allInIndex.size());

        List<ScmFile> addedFiles = new ArrayList<ScmFile>( allInIndex.size() );
View Full Code Here

    @Override
    public void commitAllChanges(Git git, String message) throws JGitFlowReleaseException
    {
        try
        {
            Status status = git.status().call();
            if (!status.isClean())
            {
                git.add().addFilepattern(".").call();
                git.commit().setMessage(message).call();
            }
        }
View Full Code Here

    @Override
    public void commitAllPoms(Git git, List<MavenProject> reactorProjects, String message) throws JGitFlowReleaseException
    {
        try
        {
            Status status = git.status().call();
            Repository repository = git.getRepository();
            File repoDir = repository.getDirectory().getParentFile();
            if (!status.isClean())
            {
                AddCommand add = git.add();

                MavenProject rootProject = ReleaseUtil.getRootProject(reactorProjects);
//                File rootBaseDir = rootProject.getBasedir();
View Full Code Here

    @Override
    public void commitAllChanges(Git git, String message) throws JGitFlowReleaseException
    {
        try
        {
            Status status = git.status().call();
            if (!status.isClean())
            {
                git.add().addFilepattern(".").call();
                git.commit().setMessage(message).call();
            }
        }
View Full Code Here

    @Override
    public void commitAllPoms(Git git, List<MavenProject> reactorProjects, String message) throws JGitFlowReleaseException
    {
        try
        {
            Status status = git.status().call();
            if (!status.isClean())
            {
                AddCommand add = git.add();

                MavenProject rootProject = ReleaseUtil.getRootProject(reactorProjects);
                File rootBaseDir = rootProject.getBasedir();
View Full Code Here

TOP

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

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.