bloomberg/git — pull request #7 by spackard (2014-02-19 00:56:02+00:00)
Title: Remove duplicate ambiguous short SHA1 error messages.

While parsing arguments to git show with short SHA1 that
is ambiguous, handle_revision_arg() will eventually call
get_short_sha1(), which reports the ambiguous short SHA1
because GET_SHA1_QUIETLY flag is not set on the call. This
causes a looping of arguments through verify_filename(),
which also eventually calls get_short_sha1() without flag
GET_SHA1_QUIETLY being set.

Adjusted get_short_sha1() to return the short name ambiguous
error code when GET_SHA1_QUIETLY is not set instead of the
return of error() to be consistent with the return code when
GET_SHA1_QUIETLY is set. handle_revision_arg() will return
that error code, which can be captured. Adjust verify_filename()
to pass a get SHA1 quietly flag for an argument that
handle_revision_arg() already reported an ambiguous short SHA1
error already. This prevents verify_filename() call stack from
reporting an ambiguous short SHA1 that's already been reported.

Signed-off-by: Steven Packard
Signed-off-by: Vineet Aguiar