Thread (77 messages) flat view 77 messages, 6 authors, 2022-01-11

Re: [PATCH 2/5] cat-file: mention --unordered along with --batch-all-objects

From: Junio C Hamano <hidden>
Date: 2021-10-08 22:04:33

Possibly related (same subject, not in this thread)

Jeff King [off-list ref] writes:
Yes, it would definitely need that extension. But it's also weirder than
that. --textconv is an OPT_CMDMODE(), because it is mutually exclusive
with "-t", etc.
Yeah, in hindsight, we should have made "--textconv" a modifier for
"-p", because it is not a true cmdmode.  It is much easier to
understand if you imagine "--textconv", without a command mode,
implies the "-p" mode, but when a command mode like "--batch" is
given, that would apply.  And it is job of other individual command
modes to notice that "--textconv" modifier does not make sense in
their context and issue a warning.
The current code uses OPT_CMDMODE() for (1) and (2), and then manually
enforces the exclusion between (1) and (3). But IMHO it is (2) that is
the odd-man out, in that it can be its own mode or a modifier, and it
probably should not be OPT_CMDMODE() (but from the end-user perspective,
that is OK, though it may influence how we document or group things).
I guess we are exactly on the same page (see "'textconv' is a
modifier, which implies '-p' command mode unless otherwise
specified" above).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help