summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e45e1f8)
Check git pull remote before defaulting to 'origin'
Signed-off-by: Pavel Roskin <proski@gnu.org>
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]