From 504fb2ee9a8b94110cb839f162789cf747f5e173 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 19 Oct 2021 11:53:46 +0100 Subject: [PATCH 1/3] tools/batch-rebase: Remove trailing dash in branch name when no suffix is given --- tools/batch-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/batch-rebase b/tools/batch-rebase index 6ad6c6438..9c4f702e7 100755 --- a/tools/batch-rebase +++ b/tools/batch-rebase @@ -590,7 +590,7 @@ 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) + new_branch = '{}-{}'.format(new_branch_stem, refs_suffix) if refs_suffix else new_branch_stem persistent_tags = default_from_conf(args.tags, ['tip', 'tags']) or args.tags_suffix # If the user passed an explicit suffix, use it rather than the date -- GitLab From 574fcc17b50a42ed19aefd0f21431815ea827ecd Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 19 Oct 2021 11:55:35 +0100 Subject: [PATCH 2/3] tools/batch-rebase: Fix --checkout Make sure git understands the argument as a branch name and not a file. --- tools/batch-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/batch-rebase b/tools/batch-rebase index 9c4f702e7..e19d5ed99 100755 --- a/tools/batch-rebase +++ b/tools/batch-rebase @@ -621,7 +621,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 -- GitLab From 86eaa56788d3442f5115fc1b5605150ffa5dc9e1 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 19 Oct 2021 12:05:10 +0100 Subject: [PATCH 3/3] tools/batch-rebase: Fix persistent tags handling --- tools/batch-rebase | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/batch-rebase b/tools/batch-rebase index e19d5ed99..44b8b7779 100755 --- a/tools/batch-rebase +++ b/tools/batch-rebase @@ -591,7 +591,9 @@ def main(): create_parser.error('--create-branch or tip/ref key in config file is mandatory') new_branch = '{}-{}'.format(new_branch_stem, refs_suffix) if refs_suffix else new_branch_stem - persistent_tags = default_from_conf(args.tags, ['tip', 'tags']) or args.tags_suffix + 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: -- GitLab