summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-02-08 20:52:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-08 23:39:55 (GMT)
commit5e8c968c6465d35c9047ab3ed522cb08d46386f5 (patch)
treeb26c9029831c2d9565c27a2626bc4a3c09030208 /builtin/receive-pack.c
parentece657f39939d067265eaf57e519a20019bcf794 (diff)
downloadgit-5e8c968c6465d35c9047ab3ed522cb08d46386f5.zip
git-5e8c968c6465d35c9047ab3ed522cb08d46386f5.tar.gz
git-5e8c968c6465d35c9047ab3ed522cb08d46386f5.tar.bz2
for_each_alternate_ref: use strbuf for path allocation
We have a string with ".../objects" pointing to the alternate object store, and overwrite bits of it to look at other paths in the (potential) git repository holding it. This works because the only path we care about is "refs", which is shorter than "objects". Using a strbuf to hold the path lets us get rid of some magic numbers, and makes it more obvious that the memory operations are safe. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
0 files changed, 0 insertions, 0 deletions