lib/pivotal-github/options.rb in pivotal-github-0.6.6 vs lib/pivotal-github/options.rb in pivotal-github-0.6.7

- old
+ new

@@ -10,9 +10,15 @@ # ['-b', '-c', 'foo bar']. def self.unknown_options(parser, args) unknown = [] recursive_parse = Proc.new do |arg_list| begin + # Hack to handle an unknown '-ff' argument + # The issue here is that OptParse interprets '-ff' as a '-f' option + # applied twice. This is sort-of a feature, as it allows, e.g., '-am' + # to set both the '-a' and '-m' options, but it interacts badly + # with '-ff' (as used by 'git merge') when '-f' is one of the options. + unknown << arg_list.delete('-ff') if arg_list.include?('-ff') parser.parse!(arg_list) rescue OptionParser::InvalidOption => e unknown.concat(e.args) while !arg_list.empty? && arg_list.first[0] != "-" unknown << arg_list.shift \ No newline at end of file