Class: GitProc::Sync
Instance Method Summary collapse
- #cleanup ⇒ Object
-
#initialize(base, opts) ⇒ Sync
constructor
A new instance of Sync.
- #runner ⇒ Object
-
#verify_preconditions ⇒ Object
noinspection RubyControlFlowConversionInspection.
Methods inherited from Process
#config, #fetch_remote_changes, #gitlib, #is_parked?, #logger, #master_branch, #remote, #run, #workdir
Constructor Details
#initialize(base, opts) ⇒ Sync
Returns a new instance of Sync.
23 24 25 26 27 28 29 |
# File 'lib/git-process/sync_process.rb', line 23 def initialize(base, opts) super @opts = opts self end |
Instance Method Details
#cleanup ⇒ Object
44 45 46 |
# File 'lib/git-process/sync_process.rb', line 44 def cleanup gitlib.stash_pop if @stash_pushed end |
#runner ⇒ Object
49 50 51 |
# File 'lib/git-process/sync_process.rb', line 49 def runner GitProc::Syncer.do_sync(gitlib, @opts) end |
#verify_preconditions ⇒ Object
noinspection RubyControlFlowConversionInspection
33 34 35 36 37 38 39 40 41 |
# File 'lib/git-process/sync_process.rb', line 33 def verify_preconditions super if not gitlib.status.clean? change_file_helper.offer_to_help_uncommitted_changes end raise ParkedChangesError.new(self) if gitlib.is_parked? end |