On Sep 26, 2016, at 05:00, Jeff King wrote:

 $ git rev-parse b2e1
 error: short SHA1 b2e1 is ambiguous
 hint: The candidates are:
 hint:   b2e1196 tag v2.8.0-rc1
 hint:   b2e11d1 tree
hint: b2e1632 commit 2007-11-14 - Merge branch 'bs/maint-commit- options'
 hint:   b2e1759 blob
 hint:   b2e18954 blob
 hint:   b2e1895c blob
fatal: ambiguous argument 'b2e1': unknown revision or path not in the working tree.
 Use '--' to separate paths from revisions, like this:
 'git <command> [<revision>...] -- [<file>...]'

This hint: information is excellent. There needs to be a way to show it on demand.

$ git rev-parse --disambiguate=b2e1

Not nearly so helpful, but the operation of --disambiguate cannot be changed without breaking current scripts.

Can your excellent "hint:" output above be attached to the -- disambiguate option somehow, please. Something like this perhaps:

$ git rev-parse --disambiguate-list=b2e1
b2e1196 tag v2.8.0-rc1
b2e11d1 tree
b2e1632 commit 2007-11-14 - Merge branch 'bs/maint-commit-options'
b2e1759 blob
b2e18954 blob
b2e1895c blob

Any option name will do, --disambiguate-verbose, --disambiguate- extended, --disambiguate-long, --disambiguate-log, --disambiguate- help, --disambiguate-show-me-something-useful-to-humans-not-scripts ...


Reply via email to