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
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-09-25 00:07:22 +0300
committerJunio C Hamano <gitster@pobox.com>2015-09-25 20:18:18 +0300
commit495127dbcbd53e89d7edee8db42bfa7e57c8a120 (patch)
treea72a2916db245c5862ee09843059886b9f673b8c /git-remote-testgit.sh
parent0e265a92a1d2b9275d638f696c65c9bbe747e78c (diff)
resolve_ref: use strbufs for internal buffers
resolve_ref already uses a strbuf internally when generating pathnames, but it uses fixed-size buffers for storing the refname and symbolic refs. This means that you cannot actually point HEAD to a ref that is larger than 256 bytes. We can lift this limit by using strbufs here, too. Like sb_path, we pass the the buffers into our helper function, so that we can easily clean up all output paths. We can also drop the "unsafe" name from our helper function, as it no longer uses a single static buffer (but of course resolve_ref_unsafe is still unsafe, because the static buffers moved there). As a bonus, we also get to drop some strcpy calls between the two fixed buffers (that cannot currently overflow because the two buffers are sized identically). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-remote-testgit.sh')
0 files changed, 0 insertions, 0 deletions