• Jeff King's avatar
    ls-files: unbreak "ls-files -i" · 500348aa
    Jeff King authored
    Commit b5227d80 changed the behavior of "ls-files" with
    respect to includes, but accidentally broke the "-i" option
    The original behavior was:
      1. if no "-i" is given, cull all results according to --exclude*
      2. if "-i" is given, show the inverse of (1)
    The broken behavior was:
      1. if no "-i" is given:
         a. for "-o", cull results according to --exclude*
         b. for index files, always show all
      2. if "-i" is given:
         a. for "-o", shows the inverse of (1a)
         b. for index files, always show all
    The fixed behavior keeps the new (1b) behavior introduced
    by b5227d80, but fixes the (2b) behavior to show only ignored
    files, not all files.
    This patch also tweaks the documentation. The original text
    was somewhat obscure in the first place, but it is also now
    inaccurate (the relationship between (1b) and (2b) is not
    quite a "reverse").
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
t3003-ls-files-exclude.sh 830 Bytes