Skip to content

pr-1236/carlsmedstad/check-ignore-non-matching-v2

From: Carl Smedstad <carl.smedstad@protonmail.com>

Allow --non-matching to be specified without the --verbose flag to make
git only list files that are not matching any pattern. The behaviour
when specifying both --non-matching and --verbose is unchanged.

The motivation for this is to use the underutilized invocation of
--non-matching without --verbose to create a shorthand for what could be
achieved by:

    find . |
      git check-ignore --verbose --non-matching --stdin |
      grep $'^::\t' |
      sed -e 's/.*\t//'

Signed-off-by: Carl Smedstad <carl.smedstad@protonmail.com>

Submitted-As: https://lore.kernel.org/git/pull.1236.v2.git.1653397315122.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1236.git.1653310466062.gitgitgadget@gmail.com
Assets 2