X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/1777d8cd458bddb1a5f638e8928726167469154c..c73e63b7d7733f1308c2c0c504144e93062bb489:/stgit/commands/pull.py diff --git a/stgit/commands/pull.py b/stgit/commands/pull.py index 8f26f4d..e47858a 100644 --- a/stgit/commands/pull.py +++ b/stgit/commands/pull.py @@ -50,10 +50,12 @@ 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: + repository = config.get('branch.%s.remote' % git.get_head_file()) or 'origin' + + refspec = None if len(args) == 2: refspec = args[1] @@ -81,4 +83,8 @@ def func(parser, options, args): if not options.nopush: push_patches(applied, options.merged) + # maybe tidy up + if config.get('stgit.keepoptimized') == 'yes': + git.repack() + print_crt_patch()