3 # Copyright (c) Linus Torvalds, 2005
6 USAGE='<option>... <pattern> <path>...'
15 --cached|--deleted|--others|--killed|\
16 --ignored|--exclude=*|\
17 --exclude-from=*|\--exclude-per-directory=*)
18 git_flags=("${git_flags[@]}" "$1")
25 flags=("${flags[@]}" "$1" "$2")
29 # The rest are git-ls-files paths (or flags)
34 flags=("${flags[@]}" "$1")
37 if [ -z "$pattern" ]; then
49 git-ls-files -z "${git_flags[@]}" "$@" |
50 xargs -0 grep "${flags[@]}" -e "$pattern"