Skip to content

Commit

Permalink
feat(reana_dev): create new branch if does not exist in git-checkout (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jlemesh committed Jul 26, 2024
1 parent 8762855 commit 105f67c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions reana/reana_dev/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,12 @@ def git_checkout(branch, component, exclude_components, fetch): # noqa: D301
run_command("git checkout {}".format(branch), component)
else:
click.secho(
"No branch {} in component {}, staying on current one.".format(
"No branch {} in component {}, creating new branch.".format(
branch, component
),
fg="red",
fg="green",
)
run_command("git checkout -b {}".format(branch), component)

Check warning on line 787 in reana/reana_dev/git.py

View check run for this annotation

Codecov / codecov/patch

reana/reana_dev/git.py#L787

Added line #L787 was not covered by tests


@click.option(
Expand Down

0 comments on commit 105f67c

Please sign in to comment.