GitOidShorten.this

Create a new OID shortener. length is the minimum length which will be used to shorted the OIDs, even if a shorter length can uniquely identify all OIDs.

  1. this()
  2. this(size_t length)
    struct GitOidShorten
    this
    (
    size_t length
    )

Examples

auto oidShort = GitOidShorten(10);
assert(oidShort.minLength == 10);

// cannot be larger than MaxHexSize
assertThrown!GitException(GitOidShorten(GitOid.MaxHexSize + 1));

Meta