• Eric Sunshine's avatar
    line-range: fix "blame -L X,-N" regression · 3bf65f9e
    Eric Sunshine authored
    "blame -L X,-N" is documented as blaming "N lines ending at X".  In
    practice, the behavior is achieved by swapping the two range endpoints
    if the second is less than the first.  25ed3412 (Refactor parse_loc;
    2013-03-28) broke this interpretation by removing the swapping code from
    blame.c and failing to add it to line-range.c along with other code
    relocated from blame.c. Thus, such a range is effectively treated as
    empty.  Fix this regression.
    Signed-off-by: Eric Sunshine's avatarEric Sunshine <sunshine@sunshineco.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    3bf65f9e
line-range.c 5.43 KB