- # push the patches back
- if not options.nopush:
- push_patches(applied, options.merged)
+ # pull the remote changes
+ if policy == 'pull':
+ out.info('Pulling from "%s"' % repository)
+ git.pull(repository)
+ elif policy == 'fetch-rebase':
+ out.info('Fetching from "%s"' % repository)
+ git.fetch(repository)
+ rebase(git.fetch_head())
+ elif policy == 'rebase':
+ rebase(crt_series.get_parent_branch())
+
+ post_rebase(applied, options.nopush, options.merged)
+
+ # maybe tidy up
+ if config.get('stgit.keepoptimized') == 'yes':
+ git.repack()