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

1 auto oidShort = GitOidShorten(10);
2 assert(oidShort.minLength == 10);
3 
4 // cannot be larger than MaxHexSize
5 assertThrown!GitException(GitOidShorten(GitOid.MaxHexSize + 1));

Meta