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

Re: [PATCH] diff: squelch empty diffs even more

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2007, 23:52 UTC
Message-ID
<7vvebhad3k.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<46C22F7C.1000502@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 16 quoted lines
> Hmm.  Like this?
>
> The patch adds a new diff_options bitfield member, no_index, that
> is used instead of the special value of -2 of the rev_info field
> max_count to indicate that the index is not to be used.  This makes
> it possible to pass that flag down to diffcore_skip_stat_unmatch(),
> which only has one diff_options parameter.
>
> This could even become a cleanup if we removed all assignments of
> max_count to a value of -2 (viz. replacement of a magic value with
> a self-documenting field name) but I didn't dare to do that so late
> in the rc game..
>
> The no_index bit, if set, then tells diffcore_skip_stat_unmatch()
> to not account for any skipped stat-mismatches, which avoids the
> suggestion to run git-status.

Yeah, I've always hated that -2 magic hack, and I think this is the right way to go. Dscho?

Previous: René ScharfeNext: Johannes Schindelin
Message 4 of 5 in “diff: squelch empty diffs even more”
  1. diff: squelch empty diffs even moreRené Scharfe, Aug 14, 2007
  2. Junio C HamanoAug 14, 2007
  3. René ScharfeAug 14, 2007
  4. Junio C HamanoAug 14, 2007
  5. Johannes SchindelinAug 15, 2007

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.