name-rev: Fix non-shortest description
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Mon, 27 Aug 2007 11:37:33 +0000 (12:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Aug 2007 05:36:43 +0000 (22:36 -0700)
commitac076c29ae8d57b72abe27f573061ea7b2eeed57
tree4b3d9e4fa5dfd9f7e986e366a7fe0e70a5e886cb
parent2b9232cc23a86f650cc1b93a35cce6ad59a8d782
name-rev: Fix non-shortest description

Uwe Kleine-König noticed that under certain circumstances, name-rev
picked a non-optimal tag.  Jeff King analyzed that name-rev only
takes into account the number of merge traversals, and then the
_last_ number in the description.

As an easy way to fix it, use a weighting factor for merge traversals:
A merge traversal is now made 65535 times more expensive than a
first-parent traversal.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-name-rev.c