Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.StoredConfig.save()


          config.setString(ConfigConstants.CONFIG_BRANCH_SECTION,
              name, ConfigConstants.CONFIG_KEY_REMOTE, ".");
          config.setString(ConfigConstants.CONFIG_BRANCH_SECTION,
              name, ConfigConstants.CONFIG_KEY_MERGE, baseBranch);
        }
        config.save();
      }
      return result;
    } catch (IOException ioe) {
      throw new JGitInternalException(ioe.getMessage(), ioe);
    }
View Full Code Here


            // remove upstream configuration if any
            final StoredConfig cfg = repo.getConfig();
            cfg.unsetSection(
                ConfigConstants.CONFIG_BRANCH_SECTION,
                shortenedName);
            cfg.save();
          }
        } else
          throw new JGitInternalException(MessageFormat.format(
              JGitText.get().deleteBranchUnexpectedResult,
              deleteResult.name()));
View Full Code Here

    {
        StoredConfig config = git.getRepository().getConfig();
        config.setString(JGitFlowConstants.SECTION, ConfigConstants.CONFIG_BRANCH_SECTION, Constants.MASTER, branchName);
        try
        {
            config.save();
        }
        catch (IOException e)
        {
            throw new JGitFlowIOException(e);
        }
View Full Code Here

    {
        StoredConfig config = git.getRepository().getConfig();
        config.setString(JGitFlowConstants.SECTION, ConfigConstants.CONFIG_BRANCH_SECTION, JGitFlowConstants.DEVELOP_KEY, branchName);
        try
        {
            config.save();
        }
        catch (IOException e)
        {
            throw new JGitFlowIOException(e);
        }
View Full Code Here

        if (getPrefixNames().contains(prefixName))
        {
            config.setString(JGitFlowConstants.SECTION, JGitFlowConstants.PREFIX_SUB, prefixName, prefixValue);
            try
            {
                config.save();
            }
            catch (IOException e)
            {
                throw new JGitFlowIOException(e);
            }
View Full Code Here

            //setup tracking
            StoredConfig config = git.getRepository().getConfig();
            config.setString(ConfigConstants.CONFIG_BRANCH_SECTION, prefixedBranchName, ConfigConstants.CONFIG_KEY_REMOTE, "origin");
            config.setString(ConfigConstants.CONFIG_BRANCH_SECTION, prefixedBranchName, ConfigConstants.CONFIG_KEY_MERGE, Constants.R_HEADS + prefixedBranchName);
            config.save();

            //checkout the branch
            git.checkout().setName(prefixedBranchName).call();

        }
View Full Code Here

        // unset a user and full maven section
        git = Git.open( getWorkingCopy() );
        config = git.getRepository().getConfig();
        unsetConfig( config );
        config.save();

        // make a change with an user on the commandline
        createAndCommitFile( fooJava, "dundy" );

        // check new commit is done with new maven user in config
View Full Code Here

        // unset all configs
        git = Git.open( getWorkingCopy() );
        config = git.getRepository().getConfig();
        unsetConfig( config );
        config.save();

        // make a change with no user on the commandline
        createAndCommitFile( fooJava, null );

        // check new commit is has a committer/author with email set
View Full Code Here

        git = Git.open( getWorkingCopy() );
        StoredConfig config = git.getRepository().getConfig();
        unsetConfig( config );
        config.setString( "user", null, "name", "Dominik" );
        config.setString( "user", null, "email", "domi@mycomp.com" );
        config.save();

        // make a commit
        createAndCommitFile( fooJava, null );

        // check new commit is done with new user in config
View Full Code Here

        // change user in config
        git = Git.open( getWorkingCopy() );
        config = git.getRepository().getConfig();
        unsetConfig( config );
        config.setString( "user", null, "name", "dbartholdi" );
        config.save();

        // make a change
        createAndCommitFile( fooJava, null );

        // check new commit is done with new user in config
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.