name-rev: include taggerdate in considering the best name
commit755042480429fbadbb1953416d2c04c035a78e4c
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 22 Apr 2016 13:39:01 +0000 (22 15:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Apr 2016 20:07:10 +0000 (22 13:07 -0700)
tree90aa3cfb200ad0ab0fedb76ec38a52e4136cb6ae
parent765428699a5381f113d19974720bc91b5bfeaf1d
name-rev: include taggerdate in considering the best name

We most likely want the oldest tag that contained the commit to be
reported. So let's remember the taggerdate, and make it more important
than anything else when choosing the best name for a given commit.

Suggested by Linus Torvalds.

Note that we need to update t9903 because it tested for the old behavior
(which preferred the description "b1~1" over "tags/t2~1").

We might want to introduce a --heed-taggerdate option, and make the new
behavior dependent on that, if it turns out that some scripts rely on the
old name-rev method.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/name-rev.c
t/t9903-bash-prompt.sh