Re: [PATCH/RFD 0/2] revision.c: --merges, --no-merges and --merges-only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 18, 2011 at 10:42:17AM +0100, Michael J Gruber wrote:

> > I saw it, I was just expecting you to start the "D" with some text. :)
> 
> According to my expectation, I get many more responses doing it this way :)

Heh, you are just trolling? :)

> Maybe you can help me understand this one:
> 
> int parse_opt_tertiary(const struct option *opt, const char *arg, int unset)
> {
>         int *target = opt->value;
>         *target = unset ? 2 : 1;
>         return 0;
> }
> 
> This is no tri-state, is it? (It's used only for the undocumented
> --autoupdate option to rerere.) I guess it's more like unset/yes/no,
> which, admittedly, counts to 3, but still.

Yeah, it is not what you want. It takes no argument at all, but is a
boolean that uses "1" and "2" for "yes" and "no" (with presumably
"0" as the "unset" version, though this callback doesn't care).

If you want a parse-options example of what you're trying to do, try
OPT__COLOR.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]