lib/git/gsub.rb in git-gsub-0.0.7 vs lib/git/gsub.rb in git-gsub-0.0.8
- old
+ new
@@ -104,10 +104,10 @@
def build_command(from, to, paths = [], _options = {})
from, to, *paths = [from, to, *paths].map { |s| Shellwords.escape s }
[from, to].each { |s| s.gsub! '@', '\@' }
- target_files = `git grep -l #{from} #{paths.join ' '}`.each_line.map(&:chomp).join ' '
+ target_files = `git grep -l #{from} #{paths.join ' '}`.each_line.map(&:chomp)
return if target_files.empty?
['perl', '-pi', '-e', "s{#{from}}{#{to}}g", *target_files]
end