From: Pavel Roskin Date: Sun, 4 Feb 2007 17:44:03 +0000 (-0500) Subject: Don't print "rebasing" if the head doesn't change X-Git-Tag: v0.12~7 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/e2b12496b78458220c8360324657421a0061fc42?ds=inline Don't print "rebasing" if the head doesn't change Signed-off-by: Pavel Roskin --- diff --git a/stgit/commands/pull.py b/stgit/commands/pull.py index b63ef7a..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"...' % git.fetch_head() - git.reset(tree_id = git.fetch_head()) + 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