summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-06-14 18:24:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-15 18:40:53 (GMT)
commitfe9e2aefd4adac63821d0c007effcc8087e32ad6 (patch)
treeacc9011fb27de95e3e628f6efde92548812f9e99 /strbuf.h
parent840ed141983718e0c5518a325534a5656797132a (diff)
downloadgit-fe9e2aefd4adac63821d0c007effcc8087e32ad6.zip
git-fe9e2aefd4adac63821d0c007effcc8087e32ad6.tar.gz
git-fe9e2aefd4adac63821d0c007effcc8087e32ad6.tar.bz2
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>
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/strbuf.h b/strbuf.h
index ba8d5f1..ca4eff8 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -266,12 +266,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
* function for every percent sign found.