From: Karthik Nayak Date: Mon, 08 Jun 2015 18:54:28 GMT Subject: Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter() Message-ID: <5575E4E4.4080403@gmail.com> In-Reply-To: On 06/08/2015 11:28 PM, Matthieu Moy wrote: > Karthik Nayak writes: > >> +int parse_opt_merge_filter(const struct option *opt, const char *arg, int unset) >> +{ >> + struct ref_filter *rf = opt->value; >> + unsigned char sha1[20]; >> + >> + rf->merge = opt->long_name[0] == 'n' >> + ? REF_FILTER_MERGED_OMIT >> + : REF_FILTER_MERGED_INCLUDE; > > I would use starts_with("no-", opt->long_name) instead. I had a hard > time understanding why the letter 'n' was special while the > starts_with() version is self-explanatory. > Can do that also :) -- Regards, Karthik