list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Matt Rogers <>
To: Junio C Hamano <>
Cc: Matthew Rogers via GitGitGadget <>,
	Git Mailing List <>, Jeff King <>
Subject: Re: [PATCH] diff: teach --stat to ignore uninteresting modifications
Date: Sat, 1 Aug 2020 21:51:35 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

> For example, if we further change mode bits of file 'x' (which has a
> whitespace-only changes applied in the test in the previous hunk),
> e.g.
>         git update-index --chmod=+x x &&
>         git diff --stat -b --cached >actual
> should that be counted as a file with 0-line change that is worth
> reporting, or is it hidden?  I _think_ the new code will do a wrong
> thing here.  That is,
>  - If the change truly is only mode bits and one and two have
>    "same_contents", the new code is bypassed, and we'll continue to
>    show "0 lines changed, but the file is worth reporting".

This first one is the behavior I was going for, I think it's most reasonable

>  - If the change is whitespace-only change plus mode bits, i.e. one
>    and two do not have "same_contents", the new code triggers and
>    the stat output is suppressed for the path.

I just ran some tests on my end, and you're correct here, I'll try to come
up with a reroll that addresses this and adds this as a test condition.

Matthew Rogers

  reply	other threads:[~2020-08-02  1:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 23:33 Matthew Rogers via GitGitGadget
2020-08-02  0:31 ` Junio C Hamano
2020-08-02  1:51   ` Matt Rogers [this message]
2020-08-14 22:45 ` [PATCH v2] " Matthew Rogers via GitGitGadget
2020-08-17 21:39   ` Junio C Hamano
2020-08-17 22:37     ` Matt Rogers
2020-08-17 22:37       ` Matt Rogers
2020-08-20  0:41   ` [PATCH v3] " Matthew Rogers via GitGitGadget
2020-08-20  0:56     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] diff: teach --stat to ignore uninteresting modifications' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).