Commit 986d7f4
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>1 parent 0202c41 commit 986d7f4
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1500 | 1500 | | |
1501 | 1501 | | |
1502 | 1502 | | |
1503 | | - | |
| 1503 | + | |
1504 | 1504 | | |
1505 | 1505 | | |
1506 | 1506 | | |
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
1513 | | - | |
1514 | | - | |
1515 | | - | |
| 1512 | + | |
| 1513 | + | |
1516 | 1514 | | |
1517 | 1515 | | |
1518 | 1516 | | |
1519 | | - | |
| 1517 | + | |
1520 | 1518 | | |
1521 | 1519 | | |
1522 | 1520 | | |
| |||
0 commit comments