pretty: recalculate duplicate short hashes
commitfe9e2aefd4adac63821d0c007effcc8087e32ad6
authorRené Scharfe <l.s.r@web.de>
Wed, 14 Jun 2017 18:24:25 +0000 (14 20:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jun 2017 18:40:53 +0000 (15 11:40 -0700)
treeacc9011fb27de95e3e628f6efde92548812f9e99
parent840ed141983718e0c5518a325534a5656797132a
pretty: recalculate duplicate short hashes

b9c6232138 (--format=pretty: avoid calculating expensive expansions
twice) optimized adding short hashes multiple times by using the
fact that the output strbuf was only ever simply appended to and
copying the added string from the previous run.  That prerequisite
is no longer given; we now have modfiers like %< and %+ that can
cause the cache to lose track of the correct offsets.  Remove it.

Reported-by: Michael Giuffrida <michaelpg@chromium.org>
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c
strbuf.c
strbuf.h