aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-11 16:12:34 -0500
committerJack Nagel2014-07-11 16:12:54 -0500
commit4fcd8fb121c2e170b0fee46321e8c6456a5c82f3 (patch)
treea84c7669e8f483d12c09e67a760b04f0b7ea79ee /Library
parentcf93f7e15901ad4493e44bfd78312aa2802a979e (diff)
downloadhomebrew-4fcd8fb121c2e170b0fee46321e8c6456a5c82f3.tar.bz2
brew-pull: use git to do the diff filtering
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-pull.rb20
1 files changed, 8 insertions, 12 deletions
diff --git a/Library/Contributions/cmd/brew-pull.rb b/Library/Contributions/cmd/brew-pull.rb
index 975ba9164..c8bc74049 100755
--- a/Library/Contributions/cmd/brew-pull.rb
+++ b/Library/Contributions/cmd/brew-pull.rb
@@ -87,19 +87,15 @@ 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")
-
- begin
- changed_formulae << Formula[name]
- rescue FormulaUnavailableError
- next
- end
+ name = File.basename(line.chomp, ".rb")
+
+ begin
+ changed_formulae << Formula[name]
+ rescue FormulaUnavailableError
+ next
end
end