Package org.eclipse.jgit.api.RebaseCommand

Examples of org.eclipse.jgit.api.RebaseCommand.Operation


      throws ServletException, JSONException, AmbiguousObjectException, IOException {
    JSONObject result = new JSONObject();
    try {
      Git git = new Git(db);
      RebaseCommand rebase = git.rebase();
      Operation operation;
      if (rebaseOperation != null) {
        operation = Operation.valueOf(rebaseOperation);
      } else {
        operation = Operation.BEGIN;
      }
      if (commitToRebase != null && !commitToRebase.isEmpty()) {
        ObjectId objectId = db.resolve(commitToRebase);
        rebase.setUpstream(objectId);
      } else if (operation.equals(Operation.BEGIN)) {
        return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST,
            "Missing commit refId.", null));
      }
      rebase.setOperation(operation);
      RebaseResult rebaseResult = rebase.call();
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.RebaseCommand.Operation

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.