Examples of abbreviate()


Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

  @Test
  public void testAbbreviateOnEmptyRepository() throws IOException {
    ObjectId id = id("9d5b926ed164e8ee88d3b8b1e525d699adda01ba");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    assertEquals(AbbreviatedObjectId.fromObjectId(id), //
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

  public void testAbbreviateOnEmptyRepository() throws IOException {
    ObjectId id = id("9d5b926ed164e8ee88d3b8b1e525d699adda01ba");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    assertEquals(AbbreviatedObjectId.fromObjectId(id), //
        reader.abbreviate(id, OBJECT_ID_STRING_LENGTH));
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

    ObjectId id = id("9d5b926ed164e8ee88d3b8b1e525d699adda01ba");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    assertEquals(AbbreviatedObjectId.fromObjectId(id), //
        reader.abbreviate(id, OBJECT_ID_STRING_LENGTH));
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    assertEquals(AbbreviatedObjectId.fromObjectId(id), //
        reader.abbreviate(id, OBJECT_ID_STRING_LENGTH));

    Collection<ObjectId> matches;
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

  @Test
  public void testAbbreviateLooseBlob() throws Exception {
    ObjectId id = test.blob("test");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

  @Test
  public void testAbbreviateLooseBlob() throws Exception {
    ObjectId id = test.blob("test");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

  public void testAbbreviateLooseBlob() throws Exception {
    ObjectId id = test.blob("test");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
    assertNotNull(matches);
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

    ObjectId id = test.blob("test");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
    assertNotNull(matches);
    assertEquals(1, matches.size());
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));

    Collection<ObjectId> matches = reader.resolve(reader.abbreviate(id, 8));
    assertNotNull(matches);
    assertEquals(1, matches.size());
    assertEquals(id, matches.iterator().next());
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

    } finally {
      dst.close();
    }
    new FileOutputStream(packFile).close();

    assertEquals(id.abbreviate(20), reader.abbreviate(id, 2));

    AbbreviatedObjectId abbrev8 = id.abbreviate(8);
    Collection<ObjectId> matches = reader.resolve(abbrev8);
    assertNotNull(matches);
    assertEquals(objects.size(), matches.size());
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.