for_each_alternate_ref: stop trimming trailing slashes
commitece657f39939d067265eaf57e519a20019bcf794
authorJeff King <peff@peff.net>
Wed, 8 Feb 2017 20:52:50 +0000 (8 15:52 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 8 Feb 2017 23:39:55 +0000 (8 15:39 -0800)
tree2a2d9990ddb327306be07b1e7855a3e1bb46c377
parent3a1345af289703a04ff4754f9167ed3cfa2dfdce
for_each_alternate_ref: stop trimming trailing slashes

The real_pathdup() function will have removed extra slashes
for us already (on top of the normalize_path() done when we
created the alternate_object_database struct in the first
place).

Incidentally, this also fixes the case where the path is
just "/", which would read off the start of the array.
That doesn't seem possible to trigger in practice, though,
as link_alt_odb_entry() blindly eats trailing slashes,
including a bare "/".

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