brew-pull: Add flag to suppress whitespace fixes
When the pull request includes a patch, fixing whitespace can break the patch.
This commit is contained in:
parent
cbdb603838
commit
d54e7fb4de
@ -13,7 +13,7 @@ if ARGV.empty?
|
||||
end
|
||||
|
||||
HOMEBREW_REPOSITORY.cd do
|
||||
ARGV.each do|arg|
|
||||
ARGV.named.each do|arg|
|
||||
if arg.to_i > 0
|
||||
url = 'https://github.com/mxcl/homebrew/pull/' + arg + '.patch'
|
||||
else
|
||||
@ -38,7 +38,11 @@ HOMEBREW_REPOSITORY.cd do
|
||||
|
||||
# Makes sense to squash whitespace errors, we don't want them.
|
||||
ohai 'Applying patch'
|
||||
safe_system 'git', 'am', '--signoff', '--whitespace=fix', patchpath
|
||||
patch_args = %w[am --signoff]
|
||||
patch_args << '--whitespace=fix' unless ARGV.include? '--ignore-whitespace'
|
||||
patch_args << patchpath
|
||||
|
||||
safe_system 'git', *patch_args
|
||||
|
||||
issue = arg.to_i > 0 ? arg.to_i : urlmatch[2]
|
||||
if issue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user