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

Re: [PATCH v3] diff: teach --stat to ignore uninteresting modifications

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2020, 00:56 UTC
Message-ID
<xmqqzh6qb0ef.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.689.v3.git.1597884092580.gitgitgadget@gmail.com>
"Matthew Rogers via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 15 quoted lines
> From: Matthew Rogers <mattr94@gmail.com>
>
> When options such as --ignore-space-change are in use, files with
> modifications can have no interesting textual changes worth showing.  In
> such cases, "git diff --stat" shows 0 lines of additions and deletions.
> Teach "git diff --stat" not to show such a path in its output, which
> would be more natural.
>
> However, we don't want to prevent the display  of all files that have 0
> effective diffs since they could be the result of a rename, permission
> change, or other similar operation that may still be of interest so we
> special case additions and deletions as they are always interesting.
>
> Signed-off-by: Matthew Rogers <mattr94@gmail.com>
> ---
Looks good, thanks.  Will queue.

By the way, before making your commits, please make sure you do not have whitespace errors. I've let my "git am" to fix them, so no need to resend, but for future reference...

.git/rebase-apply/patch:116: trailing whitespace.
			struct diffstat_file *file = 
.git/rebase-apply/patch:119: trailing whitespace.
			 * Omit diffstats of modified files where nothing changed. 
.git/rebase-apply/patch:122: trailing whitespace.
			 * 
.git/rebase-apply/patch:124: trailing whitespace.
			 * renames, and mode changes as adding an empty file, 
.git/rebase-apply/patch:127: trailing whitespace.
			if ((p->status == DIFF_STATUS_MODIFIED) 
warning: 5 lines applied after fixing whitespace errors.
Applying: diff: teach --stat to ignore uninteresting modifications
Previous: Matthew Rogers via GitGitGadget
Message 9 of 9 in “diff: teach --stat to ignore uninteresting modifications”
  1. diff: teach --stat to ignore uninteresting modificationsMatthew Rogers via GitGitGadget, Aug 1, 2020
  2. Junio C HamanoAug 2, 2020
  3. Matt RogersAug 2, 2020
  4. diff: teach --stat to ignore uninteresting modificationsMatthew Rogers via GitGitGadget, Aug 14, 2020
  5. Junio C HamanoAug 17, 2020
  6. Matt RogersAug 17, 2020
  7. Matt RogersAug 17, 2020
  8. diff: teach --stat to ignore uninteresting modificationsMatthew Rogers via GitGitGadget, Aug 20, 2020
  9. Junio C HamanoAug 20, 2020

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.