Merge pull request #601 from richardfearn/git-sed-spaces-in-filenames

git-sed: use "grep -z" and "xargs -0" to cope with spaces in filenames
This commit is contained in:
罗泽轩 2016-11-20 10:38:46 +08:00 committed by GitHub
commit 76694bccdd

View file

@ -64,6 +64,6 @@ actual command:
shift
done
command="git grep -l '$search' | xargs sed -i 's/$search/$replacement/$flags'"
git grep -l "$search" | xargs sed -i "s/$search/$replacement/$flags"
command="git grep -lz '$search' | xargs -0 sed -i 's/$search/$replacement/$flags'"
git grep -lz "$search" | xargs -0 sed -i "s/$search/$replacement/$flags"
do_commit