Thread (1 message) 1 message, 1 author, 2024-02-13

Re: [PATCH v3 0/2] column: disallow negative padding

From: Junio C Hamano <hidden>
Date: 2024-02-13 20:58:28

"Kristoffer Haugsbakk" [off-list ref] writes:
quoted
    There are not many users of OPT_INTEGER, and a quick check gives me
    the impression (maybe wrong...) that many of them do not expect
    negative values.

    Maybe we should consider having an OPT_INTEGER that fails if the
    value supplied is negative.  Ideally, some kind of opt-in machinery
    could be desirable, I think, for example to include/exclude:

    	- negative values
    	- "0"  ( may not be a desired value )
    	- "-1" ( may have some special meaning )
    	- ...

    I'll leave the idea here, just in case it inspires someone.  Thank
    you.
Interesting.

I wonder if there is a correlation between "never negative" and
"handy if it took scale unit (like 2k to mean 2048)"?  If so,
perhaps we can replace those that use OPT_INTEGER to use
OPT_MAGNITUDE instead.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help