From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: [PATCH] Re-re-re-fix common tail optimization
Date: Sun, 16 Dec 2007 14:28:13 -0800 [thread overview]
Message-ID: <7vodcqi8aq.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vtzmii8io.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Sun, 16 Dec 2007 14:23:27 -0800")
Junio C Hamano <gitster@pobox.com> writes:
>>> +test_expect_success 'diff -U0' '
>>> +
>>> + git diff -U0 | sed -e "/^index/d" -e "s/$z2047/Z/g" >actual &&
>>> + diff -u expect actual
>>
>> Aren't we using "git diff" for the second diff there nowadays?
>
> Some people seem to think that is a good idea, but I generally do not
> like using "git diff" between expect and actual (both untracked) inside
> tests. The last "diff" is about validating what git does and using "git
> diff" there would make the test meaningless when "git diff" itself is
> broken.
>
> This is especially so because comparison between untracked files is a
> bolted-on afterthought and I am least confident about among the
> codepaths in the whole "git diff" (it is not even my nor Linus's code).
Side note. The "confidence" I am talking about the above is not about
the correct-working of the current code. It seems to work fine.
It is about the fact it was bolted on rather than designed in from the
beginning---it is much likely to subtly break than other parts that are
much more integrated when you change seemingly unrelated thing like
git-dir discovery and rename detection.
IOW, the confidence is about the fixability/maintainability when
somebody breaks it.
next prev parent reply other threads:[~2007-12-16 22:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-15 11:16 trim_common_tail bug? Jeff King
2007-12-15 15:51 ` Jeff King
2007-12-15 17:49 ` Junio C Hamano
2007-12-15 20:02 ` Jeff King
2007-12-16 7:06 ` Jeff King
2007-12-16 19:43 ` Junio C Hamano
2007-12-16 21:16 ` Junio C Hamano
2007-12-16 21:21 ` Jeff King
2007-12-16 21:49 ` [PATCH] Re-re-re-fix common tail optimization Junio C Hamano
2007-12-16 22:15 ` Jeff King
2007-12-16 22:23 ` Junio C Hamano
2007-12-16 22:28 ` Junio C Hamano [this message]
2007-12-16 22:29 ` Jeff King
2007-12-17 8:42 ` Wincent Colaiuta
2007-12-17 10:39 ` Johannes Schindelin
2007-12-17 10:59 ` Wincent Colaiuta
2007-12-17 11:57 ` Johannes Schindelin
2007-12-17 12:08 ` Wincent Colaiuta
2007-12-17 12:12 ` Jeff King
2007-12-17 12:20 ` Johannes Sixt
2007-12-17 12:51 ` Johannes Schindelin
2007-12-17 17:58 ` Junio C Hamano
2007-12-17 18:05 ` Johannes Schindelin
2007-12-19 14:18 ` Charles Bailey
2007-12-19 14:27 ` Jeff King
2007-12-19 14:37 ` Charles Bailey
2007-12-20 0:21 ` Junio C Hamano
2007-12-20 1:38 ` Wincent Colaiuta
2007-12-20 9:23 ` Charles Bailey
2007-12-20 9:40 ` 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=7vodcqi8aq.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.