alternates: encapsulate alt->base munging
commit29ec6af2b81894d3236f2aec100323138023ef4d
authorJeff King <peff@peff.net>
Mon, 3 Oct 2016 20:35:43 +0000 (3 16:35 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Oct 2016 20:52:36 +0000 (10 13:52 -0700)
tree8d0f39642045d1102d85c9a21d87e5d68bc9f286
parent7f0fa2c02a6543bdadae3c4a492daae7dbc8c042
alternates: encapsulate alt->base munging

The alternate_object_database struct holds a path to the
alternate objects, but we also use that buffer as scratch
space for forming loose object filenames. Let's pull that
logic into a helper function so that we can more easily
modify it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c