cli: remove `run` and `convert` commands' --name option
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 30 Jul 2019 04:34:58 +0000 (00:34 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 2 Aug 2019 15:46:54 +0000 (11:46 -0400)
commit505d91781221dcff6f5bd9a0cd0c4fd73797d1a1
tree998bdd0c5676b63535679191b5326528cf25584a
parent453b777b566c7397f45689aa039f25cced5bad5b
cli: remove `run` and `convert` commands' --name option

There are currently two ways of setting a component's name:

  - Using the --name option
  - Using the NAME: prefix to the --component option

Having two ways of doing the same thing is not really useful here.

Supporting the --name option complicates the code a little bit: we have
to track whether the current component's name has been set, so that when
we start a new --component, we can generate a name if needed.

This patch removes the --name option in favor of always using the NAME:
prefix of --component.  This way, as soon as we handle --component, we
know if the user has provided a name or not, and if not, we can generate
one immediatly (applies only in the convert command; in the run command, the
user must provide a name).

Change-Id: Id278e9d110e4ea415f66538ac55e9459e49b1d0e
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1805
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cli/babeltrace2-cfg-cli-args.c
tests/cli/test_convert_args
This page took 0.024297 seconds and 4 git commands to generate.