• Jens Lehmann's avatar
    Teach read-tree the -n|--dry-run option · ea5070c9
    Jens Lehmann authored
    The option can be used to check if read-tree with the same set of other
    options like "-m" and "-u" would succeed without actually changing either
    the index or the working tree.
    The relevant tests in the t10?? range were extended to do a read-tree -n
    before the real read-tree to make sure neither the index nor any local
    files were changed with -n and the same exit code as without -n is
    returned. The helper functions added for that purpose reside in the new
    t/lib-read-tree.sh file.
    The only exception is #13 in t1004 ("unlinking an un-unlink-able
    symlink"). As this is an issue of wrong directory permissions it is not
    detected with -n.
    Signed-off-by: default avatarJens Lehmann <Jens.Lehmann@web.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
t1008-read-tree-overlay.sh 584 Bytes