Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.MutableObjectId.fromString()


      throws IOException {
    if (!walk.shallowCommitsInitialized)
      walk.initializeShallowCommits();

    final MutableObjectId idBuffer = walk.idBuffer;
    idBuffer.fromString(raw, 5);
    tree = walk.lookupTree(idBuffer);

    int ptr = 46;
    if (parents == null) {
      RevCommit[] pList = new RevCommit[1];
View Full Code Here


      RevCommit[] pList = new RevCommit[1];
      int nParents = 0;
      for (;;) {
        if (raw[ptr] != 'p')
          break;
        idBuffer.fromString(raw, ptr + 7);
        final RevCommit p = walk.lookupCommit(idBuffer);
        if (nParents == 0)
          pList[nParents++] = p;
        else if (nParents == 1) {
          pList = new RevCommit[] { pList[0], p };
View Full Code Here

    }
  }

  void parseCanonical(final RevWalk walk, final byte[] raw) {
    final MutableObjectId idBuffer = walk.idBuffer;
    idBuffer.fromString(raw, 5);
    tree = walk.lookupTree(idBuffer);

    int ptr = 46;
    if (parents == null) {
      RevCommit[] pList = new RevCommit[1];
View Full Code Here

      RevCommit[] pList = new RevCommit[1];
      int nParents = 0;
      for (;;) {
        if (raw[ptr] != 'p')
          break;
        idBuffer.fromString(raw, ptr + 7);
        final RevCommit p = walk.lookupCommit(idBuffer);
        if (nParents == 0)
          pList[nParents++] = p;
        else if (nParents == 1) {
          pList = new RevCommit[] { pList[0], p };
View Full Code Here

  @Test
  public void testReadACK_NAK() throws IOException {
    final ObjectId expid = ObjectId
        .fromString("fcfcfb1fd94829c1a1704f894fc111d14770d34e");
    final MutableObjectId actid = new MutableObjectId();
    actid.fromString(expid.name());

    init("0008NAK\n");
    assertSame(PacketLineIn.AckNackResult.NAK, in.readACK(actid));
    assertEquals(expid, actid);
    assertEOF();
View Full Code Here

      throws IOException {
    if (!walk.shallowCommitsInitialized)
      walk.initializeShallowCommits();

    final MutableObjectId idBuffer = walk.idBuffer;
    idBuffer.fromString(raw, 5);
    tree = walk.lookupTree(idBuffer);

    int ptr = 46;
    if (parents == null) {
      RevCommit[] pList = new RevCommit[1];
View Full Code Here

      RevCommit[] pList = new RevCommit[1];
      int nParents = 0;
      for (;;) {
        if (raw[ptr] != 'p')
          break;
        idBuffer.fromString(raw, ptr + 7);
        final RevCommit p = walk.lookupCommit(idBuffer);
        if (nParents == 0)
          pList[nParents++] = p;
        else if (nParents == 1) {
          pList = new RevCommit[] { pList[0], p };
View Full Code Here

  public void testReadACK_NAK() throws IOException {
    final ObjectId expid = ObjectId
        .fromString("fcfcfb1fd94829c1a1704f894fc111d14770d34e");
    final MutableObjectId actid = new MutableObjectId();
    actid.fromString(expid.name());

    init("0008NAK\n");
    assertSame(PacketLineIn.AckNackResult.NAK, in.readACK(actid));
    assertTrue(actid.equals(expid));
    assertEOF();
View Full Code Here

    }
  }

  void parseCanonical(final RevWalk walk, final byte[] raw) {
    final MutableObjectId idBuffer = walk.idBuffer;
    idBuffer.fromString(raw, 5);
    tree = walk.lookupTree(idBuffer);

    int ptr = 46;
    if (parents == null) {
      RevCommit[] pList = new RevCommit[1];
View Full Code Here

      RevCommit[] pList = new RevCommit[1];
      int nParents = 0;
      for (;;) {
        if (raw[ptr] != 'p')
          break;
        idBuffer.fromString(raw, ptr + 7);
        final RevCommit p = walk.lookupCommit(idBuffer);
        if (nParents == 0)
          pList[nParents++] = p;
        else if (nParents == 1) {
          pList = new RevCommit[] { pList[0], p };
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.