• Patrick Steinhardt's avatar
    urlmatch: include host in urlmatch ranking · af99049c
    Patrick Steinhardt authored
    In order to be able to rank positive matches by `urlmatch`, we inspect
    the path length and user part to decide whether a match is better than
    another match. As all other parts are matched exactly between both URLs,
    this is the correct thing to do right now.
    In the future, though, we want to introduce wild cards for the domain
    part. When doing this, it does not make sense anymore to only compare
    the path lengths. Instead, we also want to compare the domain lengths to
    determine which of both URLs matches the host part more closely.
    Signed-off-by: default avatarPatrick Steinhardt <patrick.steinhardt@elego.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
urlmatch.h 1.97 KB