Skip to content
  • Jonathan Tan's avatar
    diffcore-rename: make diff-tree -l0 mean -l<large> · 89973554
    Jonathan Tan authored and Junio C Hamano's avatar Junio C Hamano committed
    In the documentation of diff-tree, it is stated that the -l option
    "prevents rename/copy detection from running if the number of
    rename/copy targets exceeds the specified number". The documentation
    does not mention any special handling for the number 0, but the
    implementation before commit 9f7e4bfa ("diff: remove silent clamp of
    renameLimit", 2017-11-13) treated 0 as a special value indicating that
    the rename limit is to be a very large number instead.
    
    The commit 9f7e4bfa
    
     changed that behavior, treating 0 as 0. Revert
    this behavior to what it was previously. This allows existing scripts
    and tools that use "-l0" to continue working. The alternative (to have
    "-l0" suppress rename detection) is probably much less useful, since
    users can just refrain from specifying -M and/or -C to have the same
    effect.
    
    Signed-off-by: default avatarJonathan Tan <jonathantanmy@google.com>
    Reviewed-by: default avatarJonathan Nieder <jrnieder@gmail.com>
    Reviewed-by: default avatarElijah Newren <newren@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    89973554