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

Re: [PATCH v2 3/3] diff: turn skip_stat_unmatch on selectively

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 31, 2014, 16:17 UTC
Message-ID
<xmqqbnysi0s7.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CACsJy8Dd+baRUi0YjnqDXFi-Fv=K9NxwO=YbYuVEfQkdEXWWWQ@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 11 quoted lines
> On Thu, Jan 30, 2014 at 2:25 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>> On Tue, Jan 28, 2014 at 02:51:45PM -0800, Junio C Hamano wrote:
>> This however shows that the existing test *KNEW* that it was enough
>> to check just a few cases (especially, there is no reason to make
>> sure that blob vs file-in-working-tree case behaves sanely), because
>> the auto-refresh would kick in for all codepaths.  Now you are
>> making that assumption invalid, shouldn't the patch also split the
>> tests to cover individual cases?
>
> Drop the last patch, then. It's a "while at there" cleanup patch. If
> it's non trivial then it could be taken up later...
I am leaning towards that because...
> ... not sure I'll go through
> diff.c to identify and write tests for all cases.

... the effort to ensure the correctness of the patch itself involves the same identification of the cases.

We know the single place skip-stat-unmatch was assigned used to cover all cases, and the patch was to stop covering cases the unnecessary assignments are made while making sure the resulting code still covers cases that assignments are necessary.

Previous: Duy Nguyen
Message 12 of 12 in “bug with git-diff --quiet”
  1. IWAMOTO ToshihiroJan 23, 2014
  2. Duy NguyenJan 25, 2014
  3. 1/3 Move diffcore_skip_stat_unmatch core logic out for reuse laterNguyễn Thái Ngọc Duy, Jan 25, 2014
  4. 2/3 diff: do not quit early on stat-dirty filesNguyễn Thái Ngọc Duy, Jan 25, 2014
  5. 3/3 diff: turn off skip_stat_unmatch on "diff --cached"Nguyễn Thái Ngọc Duy, Jan 25, 2014
  6. 3/3 diff: turn skip_stat_unmatch on selectivelyNguyễn Thái Ngọc Duy, Jan 27, 2014
  7. Junio C HamanoJan 27, 2014
  8. Junio C HamanoJan 28, 2014
  9. Duy NguyenJan 28, 2014
  10. Junio C HamanoJan 29, 2014
  11. Duy NguyenJan 30, 2014
  12. Junio C HamanoJan 31, 2014

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.