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>
This commit is contained in:
René Scharfe
2017-06-14 20:24:25 +02:00
committed by Junio C Hamano
parent 840ed14198
commit fe9e2aefd4
3 changed files with 0 additions and 45 deletions

View File

@ -265,12 +265,6 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s)
*/
extern void strbuf_addbuf(struct strbuf *sb, const struct strbuf *sb2);
/**
* Copy part of the buffer from a given position till a given length to the
* end of the buffer.
*/
extern void strbuf_adddup(struct strbuf *sb, size_t pos, size_t len);
/**
* This function can be used to expand a format string containing
* placeholders. To that end, it parses the string and calls the specified