// convert hex to oid and back to hex const hex = "49322bb17d3acc9146f98c97d078513228bbf3c0"; const oid = GitOid(hex); assert(oid.toHex == hex);
// convert partial hex to oid and back to hex const hex = "4932"; const oid = GitOid(hex); assert(oid.toHex == "4932000000000000000000000000000000000000");
Convert this GitOid into a hex string.
Note: If this oid has been constructed with a partial hex string, toHex will still return a hex string of size MaxHexSize but with padded zeros.