git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Matt Rogers <mattr94@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthew Rogers via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [PATCH] diff: teach --stat to ignore uninteresting modifications
Date: Sat, 1 Aug 2020 21:51:35 -0400	[thread overview]
Message-ID: <CAOjrSZtbEJ5-tnU497r8jE2PYWhKR1Qu14SZRnqceRnLMSheiQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqv9i128iq.fsf@gitster.c.googlers.com>

>
> 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CAOjrSZtbEJ5-tnU497r8jE2PYWhKR1Qu14SZRnqceRnLMSheiQ@mail.gmail.com \
    --to=mattr94@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --subject='Re: [PATCH] diff: teach --stat to ignore uninteresting modifications' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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:

	https://80x24.org/mirrors/git.git

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).