diff --git a/src/b4/command.py b/src/b4/command.py index 4b71d8a8..41e7121e 100644 --- a/src/b4/command.py +++ b/src/b4/command.py @@ -378,6 +378,8 @@ def setup_parser() -> argparse.ArgumentParser: help='Do not add any addresses found in the cover or patch trailers to To: or Cc:') sp_send.add_argument('--to', nargs='+', metavar='ADDR', help='Addresses to add to the To: list') sp_send.add_argument('--cc', nargs='+', metavar='ADDR', help='Addresses to add to the Cc: list') + sp_send.add_argument('--in-reply-to', metavar='IDENTIFIER', + help='Send patchset in reply to a message') sp_send.add_argument('--not-me-too', action='store_true', default=False, help='Remove yourself from the To: or Cc: list') sp_send.add_argument('--resend', metavar='vN', nargs='?', const='latest', diff --git a/src/b4/ez.py b/src/b4/ez.py index 156926aa..ab7b7eab 100644 --- a/src/b4/ez.py +++ b/src/b4/ez.py @@ -1804,6 +1804,9 @@ def cmd_send(cmdargs: argparse.Namespace) -> None: logger.info('Converted the branch to %s messages', len(patches)) + if cmdargs.in_reply_to: + patches[0][1].add_header('In-Reply-To', '<%s>' % cmdargs.in_reply_to) + usercfg = b4.get_user_config() myemail = usercfg.get('email')