diff --git a/tools/batch-rebase b/tools/batch-rebase index 6ad6c6438fa4073a87d0b19cae9d33b62c723582..44b8b77793e5193bd00c8df2cf084f2143290c06 100755 --- a/tools/batch-rebase +++ b/tools/batch-rebase @@ -590,8 +590,10 @@ def main(): if not new_branch_stem: create_parser.error('--create-branch or tip/ref key in config file is mandatory') - new_branch = '{}-{}'.format(new_branch_stem, refs_suffix) - persistent_tags = default_from_conf(args.tags, ['tip', 'tags']) or args.tags_suffix + new_branch = '{}-{}'.format(new_branch_stem, refs_suffix) if refs_suffix else new_branch_stem + persistent_tags = bool( + default_from_conf(args.tags, ['tip', 'tags']) or args.tags_suffix + ) # If the user passed an explicit suffix, use it rather than the date if args.tags_suffix or args.refs_suffix: @@ -621,7 +623,7 @@ def main(): git = make_git_func(repo) if args.checkout: - git(['checkout', '--', new_branch]) + git(['checkout', new_branch, '--']) elif args.subcommand == 'resume': temp_repo = repo