3 usage() { echo >&2 "Usage: $0 [ --not ] [ --set | --unset | --unspecified ] <attr> <ls-files args>..."; }
7 if test $1 = "--not"; then
16 --set) state=set; shift;;
17 --unspecified) state=unspecified; shift;;
18 --unset) state=unset; shift;;
22 if test -z "$1"; then usage; exit 1; fi
27 git ls-files "$@" | git check-attr --stdin $attr | if $not; then
28 awk -F': ' -v state=$state '{ if ($3 != state) print $1 }'
30 awk -F': ' -v state=$state '{ if ($3 == state) print $1 }'