tg_cli: improve verbosity parsing.
GitOrigin-RevId: b6f6ca9e6bf5e8908e257dd78c71630dfd3e2d0e
This commit is contained in:
parent
763a88233e
commit
ae3c1208ea
@ -3893,15 +3893,14 @@ void main(int argc, char **argv) {
|
||||
if (*arg == '\0' && i + 1 < argc) {
|
||||
arg = argv[++i];
|
||||
}
|
||||
int new_verbosity = 0;
|
||||
if (arg[0] == 'v') {
|
||||
new_verbosity = 1;
|
||||
while (arg[0] == 'v') {
|
||||
new_verbosity++;
|
||||
arg++;
|
||||
}
|
||||
int new_verbosity = 1;
|
||||
while (*arg == 'v') {
|
||||
new_verbosity++;
|
||||
arg++;
|
||||
}
|
||||
if (*arg) {
|
||||
new_verbosity += to_integer<int>(Slice(arg)) - (new_verbosity == 1);
|
||||
}
|
||||
new_verbosity += to_integer<int>(Slice(arg));
|
||||
new_verbosity_level = VERBOSITY_NAME(FATAL) + new_verbosity;
|
||||
} else if (!std::strncmp(argv[i], "-l", 2)) {
|
||||
const char *arg = argv[i] + 2;
|
||||
|
Loading…
Reference in New Issue
Block a user