Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-10-20 09:19:19 +0300
committerJunio C Hamano <gitster@pobox.com>2016-10-26 23:30:51 +0300
commitef2ed5013c4160284d9de18903bd4f7d0542d810 (patch)
tree6c11907a3c953aa672bfe70534fec122c22e4744 /diff.h
parent4ce742fc9c09cd3b95be309bc093f8fa54c15f96 (diff)
find_unique_abbrev: use 4-buffer ring
Some code paths want to format multiple abbreviated sha1s in the same output line. Because we use a single static buffer for our return value, they have to either break their output into several calls or allocate their own arrays and use find_unique_abbrev_r(). Intead, let's mimic sha1_to_hex() and use a ring of several buffers, so that the return value stays valid through multiple calls. This shortens some of the callers, and makes it harder to for them to make a silly mistake. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
0 files changed, 0 insertions, 0 deletions