layout default menu_item api title OidShorten description Version 0.26.1 return_to API Documentation Index /api/ sections create #add #create #add OidShorten.create SyncExperimental var oidShorten = OidShorten.create(min_length); Parameters Type min_length Number The minimal length for all identifiers, which will be used even if shorter OIDs would still be unique. Returns OidShorten a git_oid_shorten instance, NULL if OOM OidShorten#add SyncExperimental var result = oidShorten.add(text_id); | Parameters | Type | | --- | --- | --- | | text_id | String | an OID in text form | Returns Number the minimal length to uniquely identify all OIDs added so far to the set; or an error code ( < 0) if an error occurs. |