Module: Git::Trac::Runner::Fetchable
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#add_options(opts) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/git/trac/runner.rb', line 29 def (opts) super opts.on("--against BRANCH","apply against branch BRANCH") do |b| [:upstream] = b end opts.on("--depth NUM","search depth (see git-trac help apply)") do |n| [:depth] = n end opts.on("--root DIR","apply patches relative to DIR") do |dir| [:root] = dir end add_local_option(opts) end |
#after_fetch(attachment) ⇒ Object
53 54 |
# File 'lib/git/trac/runner.rb', line 53 def after_fetch() end |
#run ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/git/trac/runner.rb', line 43 def run [:upstream] ||= repository.guess_upstream || "refs/remotes/trunk" fetch_unless_local = fetch_or_abort() repository.in_work_tree do after_fetch() end end |