X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/76c57fcf79ac80726e2435f6db9e4a5fd892eb75..f06cd2d17cc81b077f494d56b8515ebea38770f7:/stgit/commands/pull.py diff --git a/stgit/commands/pull.py b/stgit/commands/pull.py index 330cc25..2d4a782 100644 --- a/stgit/commands/pull.py +++ b/stgit/commands/pull.py @@ -73,8 +73,10 @@ def func(parser, options, args): print 'Pulling from "%s"...' % repository git.fetch(repository) if (config.get('stgit.pull-does-rebase') == 'yes'): - print "rebasing to '%s'..." % crt_series.get_parent_branch() - git.reset(tree_id = git.rev_parse(crt_series.get_parent_branch())) + fetch_head = git.fetch_head() + if fetch_head != git.get_head(): + print 'rebasing to "%s"...' % fetch_head + git.reset(tree_id = fetch_head) print 'done' # push the patches back