Message ID | 20230110-prep-opts-v1-1-8e7d7b861849@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | A prep splat fix and rework of option handling | expand |
diff --git a/b4/ez.py b/b4/ez.py index 36f935ebe993..1b7e390b7744 100644 --- a/b4/ez.py +++ b/b4/ez.py @@ -1819,7 +1819,12 @@ def auto_to_cc() -> None: logger.debug('added %s to seen', ltr.addr[1]) extras.append(ltr) - tos, ccs, tag_msg, patches = get_prep_branch_as_patches() + try: + tos, ccs, tag_msg, patches = get_prep_branch_as_patches() + except RuntimeError: + logger.info('No commits in branch') + return + logger.info('Collecting To/Cc addresses') # Go through the messages to make to/cc headers for commit, msg in patches:
Running 'b4 prep -c' on a branch with no commits will splat. Print a friendly message instead. Signed-off-by: Rob Herring <robh@kernel.org> --- b4/ez.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)