• Junio C Hamano's avatar
    Teach ls-files --with-tree=<tree> to work with options other than -c · 4b4e26d2
    Junio C Hamano authored
    Originally --with-tree=<tree> was designed for the sole purpose of
    checking if a given pathspec makes sense as a parameter to git-commit
    using it in conjunction with --error-unmatch.  It had logic to avoid
    showing the same entry (one came from the original index, another from the
    overlayed tree) twice so that it works with -c (i.e. "show-cached"), but
    otherwise it was not designed to work with the flags such as -m, -d, etc.
    
    This teaches the same logic to cover the codepath for -m and -d.
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    4b4e26d2
builtin-ls-files.c 13.9 KB