chiark
/
gitweb
/
~mdw
/
stgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e45e1f8
)
Check git pull remote before defaulting to 'origin'
author
Pavel Roskin
<proski@gnu.org>
Wed, 10 Jan 2007 19:38:25 +0000
(19:38 +0000)
committer
Catalin Marinas
<catalin.marinas@gmail.com>
Wed, 10 Jan 2007 19:38:25 +0000
(19:38 +0000)
Check git pull remote before defaulting to 'origin'
Signed-off-by: Pavel Roskin <proski@gnu.org>
stgit/commands/pull.py
patch
|
blob
|
blame
|
history
diff --git
a/stgit/commands/pull.py
b/stgit/commands/pull.py
index 227249e768e6dbc2824cd5641f170f5e196427a3..7c5db221349827239aaeed5c752cb177874292bc 100644
(file)
--- a/
stgit/commands/pull.py
+++ b/
stgit/commands/pull.py
@@
-50,10
+50,16
@@
def func(parser, options, args):
if len(args) > 2:
parser.error('incorrect number of arguments')
- repository = 'origin'
- refspec = None
if len(args) >= 1:
repository = args[0]
+ else:
+ section = 'branch "%s"' % git.get_head_file()
+ if config.has_option(section, 'remote'):
+ repository = config.get(section, 'remote')
+ else:
+ repository = 'origin'
+
+ refspec = None
if len(args) == 2:
refspec = args[1]