/** * Whether this ObjectId is actually a complete id. * * @return true if this ObjectId is actually a complete id. */ public boolean isComplete() { return length() == Constants.OBJECT_ID_STRING_LENGTH; }
private NoteParser(AbbreviatedObjectId prefix, ObjectReader r, ObjectId t) throws IncorrectObjectTypeException, IOException { super(encodeASCII(prefix.name()), r, t); prefixLen = prefix.length(); // Our path buffer has a '/' that we don't want after the prefix. // Drop it by shifting the path down one position. pathPadding = 0 < prefixLen ? 1 : 0; if (0 < pathPadding) System.arraycopy(path, 0, path, pathPadding, prefixLen); }
/** * Whether this ObjectId is actually a complete id. * * @return true if this ObjectId is actually a complete id. */ public boolean isComplete() { return length() == Constants.OBJECT_ID_STRING_LENGTH; }
/** @return true if this ObjectId is actually a complete id. */ public boolean isComplete() { return length() == Constants.OBJECT_ID_STRING_LENGTH; }
@Override public Collection<ObjectId> resolve(AbbreviatedObjectId id) throws IOException { // Because ObjectIndexKey requires at least 4 leading digits // don't resolve anything that is shorter than 4 digits. // if (id.length() < 4) return Collections.emptySet(); throw new DhtException.TODO("resolve abbreviations"); }
@Override public Collection<ObjectId> resolve(AbbreviatedObjectId id) throws IOException { // Because ObjectIndexKey requires at least 4 leading digits // don't resolve anything that is shorter than 4 digits. // if (id.length() < 4) return Collections.emptySet(); throw new DhtException.TODO("resolve abbreviations"); }
private int uniqueAbbrevLen(RevCommit commit) throws IOException { return reader.abbreviate(commit, abbrev).length(); }
private NoteParser(AbbreviatedObjectId prefix, ObjectReader r, ObjectId t) throws IncorrectObjectTypeException, IOException { super(encodeASCII(prefix.name()), r, t); prefixLen = prefix.length(); // Our path buffer has a '/' that we don't want after the prefix. // Drop it by shifting the path down one position. pathPadding = 0 < prefixLen ? 1 : 0; if (0 < pathPadding) System.arraycopy(path, 0, path, pathPadding, prefixLen); }
private NoteParser(AbbreviatedObjectId prefix, ObjectReader r, ObjectId t) throws IncorrectObjectTypeException, IOException { super(encodeASCII(prefix.name()), r, t); prefixLen = prefix.length(); // Our path buffer has a '/' that we don't want after the prefix. // Drop it by shifting the path down one position. pathPadding = 0 < prefixLen ? 1 : 0; if (0 < pathPadding) System.arraycopy(path, 0, path, pathPadding, prefixLen); }