From 87c6953990e0cf1522df4816f33674362303035f Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 10 Jan 2007 19:38:25 +0000 Subject: [PATCH] Check git pull remote before defaulting to 'origin' Check git pull remote before defaulting to 'origin' Signed-off-by: Pavel Roskin --- stgit/commands/pull.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/stgit/commands/pull.py b/stgit/commands/pull.py index 227249e..7c5db22 100644 --- 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] -- 2.11.0