2011-11-10 21:03:20 +01:00
|
|
|
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(-)
|
|
|
|
|
2011-12-06 15:23:06 +01:00
|
|
|
--- quilt-0.50.orig/quilt/grep.in
|
|
|
|
+++ quilt-0.50/quilt/grep.in
|
2011-11-10 21:03:20 +01:00
|
|
|
@@ -117,8 +117,8 @@ fi
|
2011-12-06 15:23:06 +01:00
|
|
|
find "${myargs[@]:-.}" \( \
|
2011-11-10 21:03:20 +01:00
|
|
|
-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
|