sha1_name.c: introduce get_sha1_committish()
authorJunio C Hamano <gitster@pobox.com>
Mon, 2 Jul 2012 19:04:52 +0000 (12:04 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Jul 2012 23:42:22 +0000 (16:42 -0700)
commitcd74e4733db3e2353077bdc7021caa70bed2a483
tree0f8f243291844cb4208996065ff8ca84b99a4de1
parent33bd598c3902c40c5a10a68aeaa3004484239258
sha1_name.c: introduce get_sha1_committish()

Many callers know that the user meant to name a committish by
syntactical positions where the object name appears.  Calling this
function allows the machinery to disambiguate shorter-than-unique
abbreviated object names between committish and others.

Note that this does NOT error out when the named object is not a
committish. It is merely to give a hint to the disambiguation
machinery.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
commit.c
revision.c
sha1_name.c
t/t1512-rev-parse-disambiguation.sh