brew-pull: use git to do the diff filtering
This commit is contained in:
parent
5c24b7330b
commit
845c4b7f2f
@ -87,13 +87,10 @@ ARGV.named.each do |arg|
|
||||
end
|
||||
|
||||
Utils.popen_read(
|
||||
"git", "diff-tree", "-r", "--name-status",
|
||||
revision, "HEAD", "--", formula_dir, &:read
|
||||
"git", "diff-tree", "-r", "--name-only",
|
||||
"--diff-filter=AM", revision, "HEAD", "--", formula_dir
|
||||
).each_line do |line|
|
||||
status, filename = line.split
|
||||
# Don't try and do anything to removed files.
|
||||
if status == "A" || status == "M"
|
||||
name = File.basename(filename, ".rb")
|
||||
name = File.basename(line.chomp, ".rb")
|
||||
|
||||
begin
|
||||
changed_formulae << Formula[name]
|
||||
@ -101,7 +98,6 @@ ARGV.named.each do |arg|
|
||||
next
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
unless ARGV.include?('--bottle')
|
||||
changed_formulae.each do |f|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user