From: Luke Diamand <luke@diamand.org>
To: Eric Sunshine <sunshine@sunshineco.com>,
Lars Schneider <larsxschneider@gmail.com>
Cc: "Git List" <git@vger.kernel.org>, "Torsten Bögershausen" <tboegi@web.de>
Subject: Re: [PATCH v3 1/2] git-p4: add test case for "Translation of file content failed" error
Date: Mon, 21 Sep 2015 08:47:32 +0100 [thread overview]
Message-ID: <55FFB614.7000908@diamand.org> (raw)
In-Reply-To: <CAPig+cSFbYzLi8daS55B_sdvDPW4q6yOC5Hm75+Rmr-s1aFRHw@mail.gmail.com>
On 20/09/15 23:29, Eric Sunshine wrote:
> On Sun, Sep 20, 2015 at 5:34 PM, Lars Schneider
> <larsxschneider@gmail.com> wrote:
>
>> What is the preferred way by the Git community? Combine patch and
>> test in one commit or a patch commit followed by a test commit? I
>> would prefer to have everything in one commit.
>
> If the tests are in a separate patch, Junio seems to prefer adding
> them after the problem is fixes; the idea being that tests are added
> to ensure that some future change doesn't break the feature, as
> opposed to showing that your patch fixes a bug.
>
> Whether or not to combine the fix with the new tests often depends
> upon the length of the patches and how easy or hard it is to review
> them. In this case, the fix itself is fairly short, but the tests are
> slightly lengthy, so there may not be a clear cut answer. As a
> reviewer, I tend to prefer smaller patches, however, this situation
> doesn't demand it, so use your best judgment.
I think in the past we have a test added that demonstrates the problem,
with "test_expect_failure", followed by the fix, which also flips the
test to "test_expect_success".
Luke
next prev parent reply other threads:[~2015-09-21 7:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-20 16:22 [PATCH v3 0/2] git-p4: handle "Translation of file content failed" larsxschneider
2015-09-20 16:22 ` [PATCH v3 1/2] git-p4: add test case for "Translation of file content failed" error larsxschneider
2015-09-20 21:16 ` Eric Sunshine
2015-09-20 21:34 ` Lars Schneider
2015-09-20 22:29 ` Eric Sunshine
2015-09-21 7:47 ` Luke Diamand [this message]
2015-09-21 17:41 ` Junio C Hamano
2015-09-21 7:49 ` Luke Diamand
2015-09-21 9:05 ` Lars Schneider
2015-09-21 9:14 ` Torsten Bögershausen
2015-09-21 17:43 ` Junio C Hamano
2015-09-20 16:22 ` [PATCH v3 2/2] git-p4: handle "Translation of file content failed" larsxschneider
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=55FFB614.7000908@diamand.org \
--to=luke@diamand.org \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
--cc=sunshine@sunshineco.com \
--cc=tboegi@web.de \
/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).