[PATCH] Don't print "rebasing" if the head doesn't change

Subsystems: the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH] Don't print "rebasing" if the head doesn't change

From: Pavel Roskin <hidden>
Date: 2016-06-15 22:42:52

Signed-off-by: Pavel Roskin <redacted>
---
Please ignore previous version of this patch; it was buggy.
---

 stgit/commands/pull.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
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

Re: [PATCH] Don't print "rebasing" if the head doesn't change

From: Catalin Marinas <hidden>
Date: 2016-06-15 22:42:52

On 04/02/07, Pavel Roskin [off-list ref] wrote:
Signed-off-by: Pavel Roskin <redacted>
---
Please ignore previous version of this patch; it was buggy.
Applied, thanks.

-- 
Catalin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help