From: Keith Cascio Date: Sat, 18 Apr 2009 16:41:01 GMT Subject: Re: [PATCH] Add the diff option --no-defaults Message-ID: In-Reply-To: Dscho, On Fri, 17 Apr 2009, Johannes Schindelin wrote: > Besides, you still will have a poison: > > git config diff.defaultOptions --no-defaults > > which is Russel's paradoxon right there. I can cleanly modify my v3 to handle this case. In diff_setup_done(), change this: + if (DIFF_OPT_TST(options, ALLOW_DEFAULT_OPTIONS)) + flatten_diff_options(options, defaults ? defaults : + parse_diff_defaults(diff_setup(defaults = + xmalloc(sizeof(struct diff_options))))); to this: + if (DIFF_OPT_TST(options, ALLOW_DEFAULT_OPTIONS) && (defaults || + parse_diff_defaults(diff_setup(defaults = xmalloc( + sizeof(struct diff_options))))) && DIFF_OPT_TST( + defaults, ALLOW_DEFAULT_OPTIONS)) + flatten_diff_options(options, + defaults); All I did there was add the test DIFF_OPT_TST(defaults, ALLOW_DEFAULT_OPTIONS) to the condition that controls whether to perform the flattening. Clean and clear. -- Keith