Jonathan Nieder <[email protected]> writes:
> In other words, I want the input format and output format completely
> decoupled.
I thought that the original suggestion was to use "hashname:" as a
prefix to specify input format. In other words
sha1:abababab
sha256:abababab
And an unadorned abababab is first looked up in sha256 space for
uniqueness, and if and only if there is only one object whose sha256
name begins with abababab and there is *no* object whose sha1 name
begins with that hexstring (or vice versa), that string will be
resolved to an object name.
I do not think ^{hashname} mixes well with ^{objecttype} syntax at
all as an output specifier, either. It would make sense to be more
explicit, I would think, e.g.
git rev-parse --output=sha1 sha256:abababab
(or would that be the job for name-rev?)