• Richard Hansen's avatar
    mergetool: fix running in subdir when rerere enabled · d0e0cfe7
    Richard Hansen authored
    "git mergetool" (without any pathspec on the command line) that is
    not run from the top-level of the working tree no longer works in
    Git v2.11, failing to get the list of unmerged paths from the output
    of "git rerere remaining".  This regression was introduced by
    57937f70 ("mergetool: honor diff.orderFile", 2016-10-07).
    
    This is because the pathnames output by the 'git rerere remaining'
    command are relative to the top-level directory but the 'git diff
    --name-only' command expects its pathname arguments to be relative
    to the current working directory.  To make everything consistent,
    cd_to_toplevel before running 'git diff --name-only' and adjust any
    relative pathnames.
    Signed-off-by: default avatarRichard Hansen <hansenr@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    d0e0cfe7
git-mergetool.sh 10.1 KB