From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH v2] diff-lib.c: adjust position of i-t-a entries in diff
Date: Mon, 16 Mar 2015 09:05:45 -0700 [thread overview]
Message-ID: <xmqqa8zdrkpy.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <5506F3A9.1020704@drmicha.warpmail.net> (Michael J. Gruber's message of "Mon, 16 Mar 2015 16:15:53 +0100")
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Nguyễn Thái Ngọc Duy venit, vidit, dixit 16.03.2015 14:56:
>
>> The test "cache-tree invalidates i-t-a paths" is marked failure
>> because I don't think removing "--cached" from "git diff" is the right
>> fix. This test relies on "diff --cached" behavior but the behavior now
>> has changed. We may need to revisit this test at some point in future.
>
> I can't quite follow that reasoning. If the test describes expected
> behavior which the patch breaks, then we should not apply the patch. If
> the patch changes behavior in an expected way, then we should change the
> test to match.
The offending one came from eec3e7e4 (cache-tree: invalidate i-t-a
paths after generating trees, 2012-12-16), which was a fix to an
earlier bug where a cache-tree written out of an index with i-t-a
entries had incorrect information and still claimed it is fully
valid after write-tree rebuilt it. The test probably should add
another path without i-t-a bit, run the same "diff --cached" with
updated expectation before write-tre, and run the "diff --cached"
again to make sure it produces a result that match the updated
expectation.
next prev parent reply other threads:[~2015-03-16 16:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 14:14 [PATCH/RFC 0/2] Bug fixes regarding diff and "git add -N" Nguyễn Thái Ngọc Duy
2015-03-09 14:14 ` [PATCH 1/2] diff --cached: do not report i-t-a entries as "new" Nguyễn Thái Ngọc Duy
2015-03-15 6:55 ` Junio C Hamano
2015-03-16 13:56 ` [PATCH v2] diff-lib.c: adjust position of i-t-a entries in diff Nguyễn Thái Ngọc Duy
2015-03-16 15:15 ` Michael J Gruber
2015-03-16 16:05 ` Junio C Hamano [this message]
2015-03-17 14:07 ` Duy Nguyen
2015-03-17 17:57 ` Junio C Hamano
2015-03-18 12:47 ` Duy Nguyen
2015-03-18 20:30 ` Junio C Hamano
2015-03-19 6:00 ` Junio C Hamano
2015-03-24 1:15 ` Duy Nguyen
2015-03-24 17:00 ` Junio C Hamano
2015-03-23 20:52 ` Junio C Hamano
2015-03-09 14:14 ` [PATCH 2/2] diff-files: mark i-t-a paths as "new" Nguyễn Thái Ngọc Duy
2015-03-15 7:05 ` Junio C Hamano
2015-03-09 15:45 ` [PATCH] t2203,t4011: adjust to changed intent-to-add treatment Michael J Gruber
2015-03-15 7:07 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa8zdrkpy.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).