http: simplify update_url_from_redirect
commit986d7f4d37124e1ab7dcc99587f0d6d1deeedd9c
authorJeff King <peff@peff.net>
Tue, 6 Dec 2016 18:24:29 +0000 (6 13:24 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Dec 2016 20:32:48 +0000 (6 12:32 -0800)
treea3249c45837e57d317bb2ad1a3e7eaff5cabf090
parent0202c411edc25940cc381bf317badcdf67670be4
http: simplify update_url_from_redirect

This function looks for a common tail between what we asked
for and where we were redirected to, but it open-codes the
comparison. We can avoid some confusing subtractions by
using strip_suffix_mem().

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