~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check git pull remote before defaulting to 'origin'
[stgit]
/
stgit
/
commands
/
pull.py
diff --git
a/stgit/commands/pull.py
b/stgit/commands/pull.py
index
227249e
..
7c5db22
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')
if len(args) > 2:
parser.error('incorrect number of arguments')
- repository = 'origin'
- refspec = None
if len(args) >= 1:
repository = args[0]
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]
if len(args) == 2:
refspec = args[1]