quilt/grep-support-spaces.patch

29 lines
997 B
Diff
Raw Normal View History

Subject: grep: Accept file names with spaces
This is a continuation of Yasushi SHOJI's initial work of fixing
support for file names with spaces. This time I fixed support in the
grep command. This is particularly important because the grep command
operates on all files in the work tree, even if they aren't touched
by any patch, so the chances that one of them has a space in its name
is greater. As before, no guarantee is made that all options are
covered, but this should be a good starting point.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
quilt/grep.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- quilt-0.50.orig/quilt/grep.in
+++ quilt-0.50/quilt/grep.in
@@ -117,8 +117,8 @@ fi
find "${myargs[@]:-.}" \( \
-path "./$QUILT_PATCHES/*" -o \
-path "./$QUILT_PC/*" \) -prune -o \
- -type f -print \
-| xargs grep $opt_H "${args[@]}" \
+ -type f -print0 \
+| xargs -0 grep $opt_H "${args[@]}" \
| if [ ${#myargs[@]} -eq 0 ]; then
sed -e 's,^./,,'
else