Subject: Re: [PATCH] ls-tree: fix --no-full-name

From: Junio C Hamano <[email-masked]>
Date: Fri, 21 Jul 2023 07:37:38 -0700

René Scharfe <[email-masked]> writes:

> Overall I get the impression that having the negative form enabled by
> default was not a good idea.  For boolean options it makes sense, for
> options with arguments perhaps as well, but for OPT_SET_INT we would
> have less confusion if the negated form was opt-in.
>
> To make it easier discoverable we could let the short help include
> the optional "no-" part, which would look like this:
>
> usage: git ls-tree [<options>] <tree-ish> [<path>...]
>
>     -d                    only show trees
>     -r                    recurse into subtrees
>     -t                    show trees when recursing
>     -z                    terminate entries with NUL byte
>     -l, --long            include object size
>     --name-only           list only filenames
>     --name-status         list only filenames
>     --object-only         list only objects
>     --[no-]full-name      use full path names
>     --[no-]full-tree      list entire tree; not just current directory (implies --full-name)
>     --format <format>     format to use for the output
>     --[no-]abbrev[=<n>]   use <n> digits to display object names
>
> Thoughts?

I like the "optional no- accepted" markings, but I suspect there may
be quite a lot of fallouts.