Package org.eclipse.jgit.api.errors

Examples of org.eclipse.jgit.api.errors.InvalidRefNameException


    try {
      if (repo.getRef(Constants.R_STASH) == null)
        return Collections.emptyList();
    } catch (IOException e) {
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().cannotRead, Constants.R_STASH), e);
    }

    final ReflogCommand refLog = new ReflogCommand(repo);
    refLog.setRef(Constants.R_STASH);
View Full Code Here


    final String revision = stashRef != null ? stashRef : DEFAULT_REF;
    final ObjectId stashId;
    try {
      stashId = repo.resolve(revision);
    } catch (IOException e) {
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().stashResolveFailed, revision), e);
    }
    if (stashId == null)
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().stashResolveFailed, revision));
    return stashId;
  }
View Full Code Here

  }

  private void processOptions() throws InvalidRefNameException {
    if (name == null
        || !Repository.isValidRefName(Constants.R_HEADS + name))
      throw new InvalidRefNameException(MessageFormat.format(JGitText
          .get().branchNameInvalid, name == null ? "<null>" : name)); //$NON-NLS-1$
  }
View Full Code Here

    final String revision = stashRef != null ? stashRef : DEFAULT_REF;
    final ObjectId stashId;
    try {
      stashId = repo.resolve(revision);
    } catch (IOException e) {
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().stashResolveFailed, revision), e);
    }
    if (stashId == null)
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().stashResolveFailed, revision));
    return stashId;
  }
View Full Code Here

  private void processOptions() throws InvalidRefNameException {
    if ((!checkoutAllPaths && paths.isEmpty())
        && (name == null || !Repository
            .isValidRefName(Constants.R_HEADS + name)))
      throw new InvalidRefNameException(MessageFormat.format(JGitText
          .get().branchNameInvalid, name == null ? "<null>" : name)); //$NON-NLS-1$
  }
View Full Code Here

  private Ref getRef() throws GitAPIException {
    try {
      return repo.getRef(R_STASH);
    } catch (IOException e) {
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().cannotRead, R_STASH), e);
    }
  }
View Full Code Here

    try {
      Ref newStashRef = repo.getRef(R_STASH);
      return newStashRef != null ? newStashRef.getObjectId() : null;
    } catch (IOException e) {
      throw new InvalidRefNameException(MessageFormat.format(
          JGitText.get().cannotRead, R_STASH), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.api.errors.InvalidRefNameException

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.