*/
public PullResult call() throws WrongRepositoryStateException,
InvalidConfigurationException, DetachedHeadException,
- InvalidRemoteException, CanceledException {
+ InvalidRemoteException, CanceledException, RefNotFoundException {
checkCallable();
monitor.beginTask(JGitText.get().pullTaskName, 2);
} else {
try {
commitToMerge = repo.resolve(remoteBranchName);
+ if (commitToMerge == null)
+ throw new RefNotFoundException(MessageFormat.format(
+ JGitText.get().refNotResolved, remoteBranchName));
} catch (IOException e) {
throw new JGitInternalException(
JGitText.get().exceptionCaughtDuringExecutionOfPullCommand,