Message ID | 20230206-b4-prep-fork-point-as-base-branch-v1-1-2732e0c32f5d@tessares.net (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | "b4 prep --new --fork-point" is not clear to me | expand |
diff --git a/b4/ez.py b/b4/ez.py index 74afddc..2722c6c 100644 --- a/b4/ez.py +++ b/b4/ez.py @@ -345,7 +345,7 @@ def start_new_series(cmdargs: argparse.Namespace) -> None: basebranch = mybranch break else: - basebranch = mybranch + basebranch = cmdargs.fork_point if basebranch is None: logger.critical('CRITICAL: fork-point %s is not on the current branch.', cmdargs.fork_point)
When creating a new branch with a fork point, use it as base branch. Without that, when using: b4 prep -n ${NEW_SERIES_NAME} -f ${FORK_POINT} The branch ${NEW_SERIES_NAME} will be created on top of ${FORK_POINT} but the current branch will be set as base branch. ${FORK_POINT} can be quite different from the current branch. Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- b4/ez.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)