Example usage for org.eclipse.jgit.api.errors InvalidRefNameException InvalidRefNameException

List of usage examples for org.eclipse.jgit.api.errors InvalidRefNameException InvalidRefNameException

Introduction

In this page you can find the example usage for org.eclipse.jgit.api.errors InvalidRefNameException InvalidRefNameException.

Prototype

public InvalidRefNameException(String msg, Throwable cause) 

Source Link

Document

Constructor for InvalidRefNameException.

Usage

From source file:org.eclipse.orion.server.git.jobs.StashApplyCommand.java

License:Eclipse Distribution License

private ObjectId getStashId() throws GitAPIException {
    final String revision = stashRef != null ? stashRef : DEFAULT_REF;
    final ObjectId stashId;
    try {/*from  w  ww .  j a v  a  2 s .  c  o m*/
        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;
}