Fix brew pull looking at uncommitted work.

This commit is contained in:
Mike McQuaid 2010-12-02 00:10:03 +00:00
parent 1efd33cac0
commit f44d1f06e5

View File

@ -33,10 +33,10 @@ HOMEBREW_REPOSITORY.cd do
safe_system 'git', 'am', '--signoff', '--whitespace=fix', patchpath safe_system 'git', 'am', '--signoff', '--whitespace=fix', patchpath
ohai 'Patch changed:' ohai 'Patch changed:'
safe_system 'git', 'diff', 'HEAD~1', '--stat' safe_system 'git', 'diff', 'HEAD^..HEAD', '--stat'
if install if install
status, filename = `git diff HEAD~1 --name-status`.split() status, filename = `git diff HEAD^..HEAD --name-status`.split()
# Don't try and do anything to removed files. # Don't try and do anything to removed files.
if (status == 'A' or status == 'M') and filename.include? '/Formula/' if (status == 'A' or status == 'M') and filename.include? '/Formula/'
formula = File.basename(filename, '.rb') formula = File.basename(filename, '.rb')