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

[PATCH 1/3] The user does not want to mess with the refspecs.

From
Yann Dirson <ydirson@altern.org>
Date
Feb 1, 2007, 23:48 UTC
Message-ID
<20070201234759.3313.51174.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070201234534.3313.10426.stgit@gandelf.nowhere.earth>

The only use I know of for this parameter is 'stg pull . <branch>', for which 'stg rebase <branch>' should be used instead.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 stgit/commands/pull.py |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/stgit/commands/pull.py b/stgit/commands/pull.py
index 0608fb6..f837fd4 100644
--- a/stgit/commands/pull.py
+++ b/stgit/commands/pull.py
@@ -24,7 +24,7 @@ from stgit import stack, git
 
 
 help = 'pull the changes from the remote repository'
-usage = """%prog [options] [<repository>] [<refspec>]
+usage = """%prog [options] [<repository>]
 
 Pull the latest changes from the given repository (defaulting to
 'origin'). This command works by popping all the patches from the
@@ -34,8 +34,7 @@ of the stack to the latest parent HEAD and pushing the patches back
 there are conflicts. They need to be resolved and the patch pushed
 again.
 
-Check the 'git pull' documentation for the <repository> and <refspec>
-format."""
+Check the 'git pull' documentation for the <repository> format."""
 
 options = [make_option('-n', '--nopush',
                        help = 'do not push the patches back after pulling',
@@ -47,7 +46,7 @@ options = [make_option('-n', '--nopush',
 def func(parser, options, args):
     """Pull the changes from a remote repository
     """
-    if len(args) > 2:
+    if len(args) > 1:
         parser.error('incorrect number of arguments')
 
     if len(args) >= 1:
@@ -55,10 +54,6 @@ def func(parser, options, args):
     else:
         repository = crt_series.get_parent_remote()
 
-    refspec = None
-    if len(args) == 2:
-        refspec = args[1]
-
     if crt_series.get_protected():
         raise CmdException, 'This branch is protected. Pulls are not permitted'
 
@@ -76,7 +71,7 @@ def func(parser, options, args):
 
     # pull the remote changes
     print 'Pulling from "%s"...' % repository
-    git.pull(repository, refspec)
+    git.pull(repository)
     print 'done'
 
     # push the patches back
Previous: Yann DirsonNext: Yann Dirson
Message 2 of 21 in “Update to stgit parent tracking”
  1. 0/3 Update to stgit parent trackingYann Dirson, Feb 1, 2007
  2. 1/3 The user does not want to mess with the refspecs.Yann Dirson, Feb 1, 2007
  3. 2/3 Rebase to parent branch after git-fetch in "stg pull".Yann Dirson, Feb 1, 2007
  4. Catalin MarinasFeb 2, 2007
  5. Yann DirsonFeb 2, 2007
  6. Yann DirsonFeb 2, 2007
  7. Catalin MarinasFeb 2, 2007
  8. Catalin MarinasFeb 2, 2007
  9. Yann DirsonFeb 3, 2007
  10. Junio C HamanoFeb 3, 2007
  11. Junio C HamanoFeb 4, 2007
  12. Yann DirsonFeb 4, 2007
  13. Jeff KingFeb 4, 2007
  14. Junio C HamanoFeb 4, 2007
  15. Jeff KingFeb 4, 2007
  16. git-clone wrongly setting branch.*.merge ? (Was: [PATCH 2/3] Rebase to parent branch after git-fetch in "stg pull".)Yann Dirson, Feb 2, 2007
  17. Yann DirsonFeb 3, 2007
  18. Jakub NarebskiFeb 3, 2007
  19. Catalin MarinasFeb 3, 2007
  20. Yann DirsonFeb 3, 2007
  21. 3/3 Do not return 'origin' as parent remote when there is no such remote.Yann Dirson, Feb 1, 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.