git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
PRPavel Roskin <proski@gnu.org>
Date
Feb 4, 2007, 05:32 UTC
Message-ID
<20070204053231.15035.4631.stgit@dv.roinet.com>
In-Reply-To
<20070204053221.15035.88015.stgit@dv.roinet.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 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..0aee6bf 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())
+        tree_id = git.fetch_head()
+        if tree_id != git.get_head():
+            print 'rebasing to "%s"...' % tree_id
+            git.reset(tree_id)
     print 'done'
 
     # push the patches back
Previous: Pavel RoskinNext: Pavel Roskin
Message 3 of 4 in “Rename branch section in config when the branch is renamed”
  1. 1/4 Rename branch section in config when the branch is renamedPavel Roskin, Feb 4, 2007
  2. 2/4 Copy remote and merge settings when cloning a branchPavel Roskin, Feb 4, 2007
  3. 3/4 Don't print "rebasing" if the head doesn't changePavel Roskin, Feb 4, 2007
  4. 4/4 Assorted typosPavel Roskin, Feb 4, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.