git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] diff: change semantics of "ignore whitespace" options

From
Jeff King <peff@peff.net>
Date
May 25, 2009, 11:04 UTC
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:
Show 7 quoted lines
> +	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
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “Update "diff -w --exit-code"”
  1. 0/2 Update "diff -w --exit-code"Junio C Hamano, May 23, 2009
  2. 1/2 diff: change semantics of "ignore whitespace" optionsJunio C Hamano, May 23, 2009
  3. 2/2 diff: Rename QUIET internal option to QUICKJunio C Hamano, May 23, 2009
  4. Jeff KingMay 25, 2009
  5. Junio C HamanoMay 25, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.