Package org.eclipse.jgit.api

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


        if (startPoint != null && !startPoint.isEmpty()) {
          cc.setStartPoint(startPoint);
          cc.setUpstreamMode(SetupUpstreamMode.TRACK);
        }

        Ref ref = cc.call();

        URI cloneLocation = BaseToCloneConverter.getCloneLocation(getURI(request), BaseToCloneConverter.BRANCH_LIST);
        JSONObject result = new Branch(cloneLocation, db, ref).toJSON();
        OrionServlet.writeJSONResponse(request, response, result, JsonURIUnqualificationStrategy.ALL_NO_GIT);
        response.setHeader(ProtocolConstants.HEADER_LOCATION, result.getString(ProtocolConstants.KEY_LOCATION));
View Full Code Here


    public void createBranch(String name) {
        try {
            CreateBranchCommand command = git.branchCreate();
            command.setName(name);
            command.call();
        } catch (JGitInternalException e) {
            throw new IllegalStateException("Unable to create a new branch <" + name + ">.", e);
        } catch (RefAlreadyExistsException e) {
            throw new IllegalStateException("Unable to create a new branch <" + name + ">.", e);
        } catch (RefNotFoundException 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.