private Ref getHead() throws GitAPIException { try { Ref head = repo.exactRef(Constants.HEAD); if (head == null || head.getObjectId() == null) throw new NoHeadException(JGitText.get().headRequiredToStash); return head; } catch (IOException e) { throw new JGitInternalException(JGitText.get().stashFailed, e); } }
e.printStackTrace(); } catch (NoHeadException e) { e.printStackTrace(); } catch (NoMessageException e) { e.printStackTrace();
GitClient.log.error("NoHeadException while cloning GIT repository [" + _repoUrl + "]: " + e.getMessage(), e); throw new RepoMismatchException( this, this.url, e );
e.printStackTrace(); } catch (NoHeadException e) { e.printStackTrace(); } catch (NoMessageException e) { e.printStackTrace();
fullOldName = repo.getFullBranch(); if (fullOldName == null) { throw new NoHeadException( JGitText.get().invalidRepositoryStateNoHead);
private RevCommit checkoutCurrentHead() throws IOException, NoHeadException { ObjectId headTree = repo.resolve(Constants.HEAD + "^{tree}"); //$NON-NLS-1$ if (headTree == null) throw new NoHeadException( JGitText.get().cannotRebaseWithoutCurrentHead); DirCache dc = repo.lockDirCache(); try { DirCacheCheckout dco = new DirCacheCheckout(repo, dc, headTree); dco.setFailOnConflict(false); dco.setProgressMonitor(monitor); boolean needsDeleteFiles = dco.checkout(); if (needsDeleteFiles) { List<String> fileList = dco.getToBeDeleted(); for (String filePath : fileList) { File fileToDelete = new File(repo.getWorkTree(), filePath); if (repo.getFS().exists(fileToDelete)) FileUtils.delete(fileToDelete, FileUtils.RECURSIVE | FileUtils.RETRY); } } } finally { dc.unlock(); } try (RevWalk rw = new RevWalk(repo)) { RevCommit commit = rw.parseCommit(repo.resolve(Constants.HEAD)); return commit; } }
ObjectId headId = repo.resolve(Constants.HEAD); if (headId == null) throw new NoHeadException( JGitText.get().noHEADExistsAndNoExplicitStartingRevisionWasSpecified); add(headId);
ObjectId head = repo.resolve(HEAD + "^{tree}"); //$NON-NLS-1$ if (head == null) throw new NoHeadException(JGitText.get().cannotReadTree); CanonicalTreeParser p = new CanonicalTreeParser(); try (ObjectReader reader = repo.newObjectReader()) {
throw new NoHeadException( JGitText.get().cannotCheckoutFromUnbornBranch);
throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
ObjectId id = repo.resolve(Constants.HEAD + "^{tree}"); //$NON-NLS-1$ if (id == null) throw new NoHeadException( JGitText.get().cannotRebaseWithoutCurrentHead);
Ref head = repo.exactRef("HEAD"); //$NON-NLS-1$ if (head == null) { throw new NoHeadException( JGitText.get().invalidRepositoryStateNoHead);
Ref head = repo.exactRef(Constants.HEAD); if (head == null) throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported); StringBuilder refLogMessage = new StringBuilder("merge "); //$NON-NLS-1$ refUpdate.setRefLogMessage("initial pull", false); //$NON-NLS-1$ if (refUpdate.update() != Result.NEW) throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported); setCallable(false);
ObjectId objectId = repo.resolve(Constants.HEAD + "^{commit}"); //$NON-NLS-1$ if (objectId == null) throw new NoHeadException( JGitText.get().tagOnRepoWithoutHEADCurrentlyNotSupported);
throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported); RevCommit headCommit = revWalk.parseCommit(headRef.getObjectId());
throw new NoHeadException(JGitText.get().stashApplyWithoutHead);
throw new NoHeadException( JGitText.get().commitOnRepoWithoutHEADCurrentlyNotSupported);
private Ref getHead() throws GitAPIException { try { Ref head = repo.exactRef(Constants.HEAD); if (head == null || head.getObjectId() == null) throw new NoHeadException(JGitText.get().headRequiredToStash); return head; } catch (IOException e) { throw new JGitInternalException(JGitText.get().stashFailed, e); } }
private Ref getHead() throws GitAPIException { try { Ref head = repo.exactRef(Constants.HEAD); if (head == null || head.getObjectId() == null) throw new NoHeadException(JGitText.get().headRequiredToStash); return head; } catch (IOException e) { throw new JGitInternalException(JGitText.get().stashFailed, e); } }
fullOldName = repo.getFullBranch(); if (fullOldName == null) { throw new NoHeadException( JGitText.get().invalidRepositoryStateNoHead);