]> Pileus Git - ~andy/git/commit
sha1_name.c: teach get_short_sha1() a commit-only option
authorJunio C Hamano <gitster@pobox.com>
Thu, 21 Jun 2012 06:03:09 +0000 (23:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Jul 2012 18:17:59 +0000 (11:17 -0700)
commitaa1dec9ef6ff184792520eb4539af1555c01604c
tree57f7ce140695ba2f9f6ce28f3674a204a899c9de
parent37c00e5590605c9d3ba76b6c9d7a94ac0356f703
sha1_name.c: teach get_short_sha1() a commit-only option

When the caller knows that the parameter is meant to name a commit,
e.g. "56789a" in describe name "v1.2.3-4-g56789a", pass that as a
hint so that lower level can use it to disambiguate objects when
there is only one commit whose name begins with 56789a even if there
are objects of other types whose names share the same prefix.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
sha1_name.c