Module: Git::Multi::Nike

Defined in:
lib/git/multi.rb

Overview

the main ‘Git::Multi` capabilities

Instance Method Summary collapse

Instance Method Details

#just_do_it(interactive, pipeline, options = {}) ⇒ Object



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/git/multi.rb', line 135

def just_do_it(interactive, pipeline, options = {})
  working_dir = case (options[:in] || '').to_sym
                when :parent_dir then parent_dir
                when :local_path then local_path
                else Dir.pwd
                end
  Dir.chdir(working_dir) do
    if interactive?
      puts "#{full_name.invert} (#{fractional_index})"
      interactive.call(self)
    else
      pipeline.call(self)
    end
  end
end