/** * Mark an element which used to be shallow in the client, but which * should now be considered a full commit. Any ancestors of this commit * should be included in the walk, even if they are the ancestor of an * uninteresting commit. * * @param c * Commit to mark * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ public void markUnshallow(RevObject c) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (c instanceof RevCommit) c.add(UNSHALLOW); super.markStart(c); }
/** * Mark a root commit (i.e., one whose depth should be considered 0.) * * @param o * Commit to mark * @throws IOException * @throws IncorrectObjectTypeException * @throws MissingObjectException */ public void markRoot(RevObject o) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = o; while (c instanceof RevTag) { c = ((RevTag) c).getObject(); parseHeaders(c); } if (c instanceof Commit) ((Commit) c).depth = 0; super.markStart(o); }
private boolean askForIsComplete() throws TransportException { try { try (ObjectWalk ow = new ObjectWalk(transport.local)) { for (ObjectId want : askFor.keySet()) ow.markStart(ow.parseAny(want)); for (Ref ref : localRefs().values()) ow.markUninteresting(ow.parseAny(ref.getObjectId())); ow.checkConnectivity(); } return true; } catch (MissingObjectException e) { return false; } catch (IOException e) { throw new TransportException(JGitText.get().unableToCheckConnectivity, e); } }
ow.markStart(tip); } catch (MissingObjectException e) { errors.getMissingObjects().add(e.getObjectId());
walker.markStart(obj);
/** * Mark an element which used to be shallow in the client, but which * should now be considered a full commit. Any ancestors of this commit * should be included in the walk, even if they are the ancestor of an * uninteresting commit. * * @param c * Commit to mark * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ public void markUnshallow(RevObject c) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (c instanceof RevCommit) c.add(UNSHALLOW); super.markStart(c); }
/** * Mark an element which used to be shallow in the client, but which * should now be considered a full commit. Any ancestors of this commit * should be included in the walk, even if they are the ancestor of an * uninteresting commit. * * @param c * Commit to mark * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ public void markUnshallow(RevObject c) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (c instanceof RevCommit) c.add(UNSHALLOW); super.markStart(c); }
/** * Mark an element which used to be shallow in the client, but which * should now be considered a full commit. Any ancestors of this commit * should be included in the walk, even if they are the ancestor of an * uninteresting commit. * * @param c * Commit to mark * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ public void markUnshallow(RevObject c) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (c instanceof RevCommit) c.add(UNSHALLOW); super.markStart(c); }
try { if (!bitmapResult.contains(obj)) { walker.markStart(walker.parseAny(obj)); marked = true;
/** * Mark a root commit (i.e., one whose depth should be considered 0.) * * @param o * Commit to mark * @throws IOException * @throws IncorrectObjectTypeException * @throws MissingObjectException */ public void markRoot(RevObject o) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = o; while (c instanceof RevTag) { c = ((RevTag) c).getObject(); parseHeaders(c); } if (c instanceof Commit) ((Commit) c).depth = 0; super.markStart(o); }
/** * Mark a root commit (i.e., one whose depth should be considered 0.) * * @param o * Commit to mark * @throws IOException * @throws IncorrectObjectTypeException * @throws MissingObjectException */ public void markRoot(RevObject o) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = o; while (c instanceof RevTag) { c = ((RevTag) c).getObject(); parseHeaders(c); } if (c instanceof Commit) ((Commit) c).depth = 0; super.markStart(o); }
/** * Mark a root commit (i.e., one whose depth should be considered 0.) * * @param o * Commit to mark * @throws IOException * @throws IncorrectObjectTypeException * @throws MissingObjectException */ public void markRoot(RevObject o) throws MissingObjectException, IncorrectObjectTypeException, IOException { RevObject c = o; while (c instanceof RevTag) { c = ((RevTag) c).getObject(); parseHeaders(c); } if (c instanceof Commit) ((Commit) c).depth = 0; super.markStart(o); }
if (cmd.getType() == ReceiveCommand.Type.DELETE) continue; ow.markStart(ow.parseAny(cmd.getNewId()));
private boolean askForIsComplete() throws TransportException { try { try (final ObjectWalk ow = new ObjectWalk(transport.local)) { for (final ObjectId want : askFor.keySet()) ow.markStart(ow.parseAny(want)); for (final Ref ref : localRefs().values()) ow.markUninteresting(ow.parseAny(ref.getObjectId())); ow.checkConnectivity(); } return true; } catch (MissingObjectException e) { return false; } catch (IOException e) { throw new TransportException(JGitText.get().unableToCheckConnectivity, e); } }
private boolean askForIsComplete() throws TransportException { try { try (ObjectWalk ow = new ObjectWalk(transport.local)) { for (ObjectId want : askFor.keySet()) ow.markStart(ow.parseAny(want)); for (Ref ref : localRefs().values()) ow.markUninteresting(ow.parseAny(ref.getObjectId())); ow.checkConnectivity(); } return true; } catch (MissingObjectException e) { return false; } catch (IOException e) { throw new TransportException(JGitText.get().unableToCheckConnectivity, e); } }
private Set<LfsPointer> findObjectsToPush() throws IOException, MissingObjectException, IncorrectObjectTypeException { Set<LfsPointer> toPush = new TreeSet<>(); try (ObjectWalk walk = new ObjectWalk(getRepository())) { for (RemoteRefUpdate up : refs) { walk.setRewriteParents(false); excludeRemoteRefs(walk); walk.markStart(walk.parseCommit(up.getNewObjectId())); while (walk.next() != null) { // walk all commits to populate objects } findLfsPointers(toPush, walk); } } return toPush; }
ow.markStart(tip); } catch (MissingObjectException e) { errors.getMissingObjects().add(e.getObjectId());