Get a short abbreviated OID string for the object
This starts at the "core.abbrev" length (default 7 characters) and iteratively extends to a longer string if that length is ambiguous. The result will be unambiguous (at least until new objects are added to the repository).
0 on success, < 0 for error