Skip to content
  • Derrick Stolee's avatar
    commit-reach: move ref_newer from remote.c · 1d614d41
    Derrick Stolee authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    There are several commit walks in the codebase. Group them together into
    a new commit-reach.c file and corresponding header. After we group these
    walks into one place, we can reduce duplicate logic by calling
    equivalent methods.
    
    The ref_newer() method is used by 'git push -f' to check if a force-push
    is necessary. By making the method public, we make it possible to test
    the method directly without setting up an envieronment where a 'git
    push' call makes sense.
    
    Signed-off-by: default avatarDerrick Stolee <dstolee@microsoft.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    1d614d41