Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-09 Thread Karthik Nayak
On 06/09/2015 12:50 AM, Junio C Hamano wrote: Karthik Nayak karthik@gmail.com 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] ==

Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-08 Thread Matthieu Moy
Karthik Nayak karthik@gmail.com 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 +

Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-08 Thread Junio C Hamano
Karthik Nayak karthik@gmail.com 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 +

Re: [RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-08 Thread Karthik Nayak
On 06/08/2015 11:28 PM, Matthieu Moy wrote: Karthik Nayak karthik@gmail.com 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'

[RFC/PATCH 4/9] parse-options: add parse_opt_merge_filter()

2015-06-06 Thread Karthik Nayak
Add 'parse_opt_merge_filter()' to parse '--merged' and '--no-merged' options and write MACROS for the same. Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak