From: Jeff King Date: Mon, 25 May 2009 11:04:29 GMT Subject: Re: [PATCH 1/2] diff: change semantics of "ignore whitespace" options Message-ID: <20090525110429.GB27070@coredump.intra.peff.net> In-Reply-To: <1243106690-6385-2-git-send-email-gitster@pobox.com> On Sat, May 23, 2009 at 12:24:49PM -0700, Junio C Hamano wrote: > When --quiet is in effect, various diff frontends optimize by breaking out > early from the loop that enumerates the filepairs, when we find the first > path level difference; when --ignore-whitespace* is used the above change > automatically disables this optimization. Both patches in this series look good to me, with one slight exception: > + if ((XDF_IGNORE_WHITESPACE| > + XDF_IGNORE_WHITESPACE_CHANGE| > + XDF_IGNORE_WHITESPACE_AT_EOL) & options->xdl_opts) { > + DIFF_OPT_SET(options, DIFF_FROM_CONTENTS); > + } else { > + DIFF_OPT_CLR(options, DIFF_FROM_CONTENTS); > + } We have DIFF_XDL_TST these days; while it is currently equivalent to what you do here, I thought part of the purpose was to abstract it to make it simpler to later add master/slave magic. -Peff