From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Aaron Lipman <alipman88@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH] t3200: clean side effect of git checkout --orphan
Date: Mon, 31 Aug 2020 11:21:51 -0700 [thread overview]
Message-ID: <xmqqimcyfzgg.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAPig+cQeYz9Mh+26YshuCQSzXCCUyKNGGr1wJ3FNNLpf=9QRuw@mail.gmail.com> (Eric Sunshine's message of "Sun, 30 Aug 2020 01:35:05 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> On Sat, Aug 29, 2020 at 6:57 PM Aaron Lipman <alipman88@gmail.com> wrote:
>> The "refuse --edit-description on unborn branch for now" test in t3200
>> switches to an orphan branch, causing subsequent git commands
>> referencing HEAD to fail. Avoid this side-effect by switching back to
>> master after that test finishes.
>>
>> This has gone undetected, as the next effected test expects failure -
>> but it currently fails for the wrong reason.
>
> s/effected/affected
>
> In fact, the three tests following the orphan test all expect failure
> (though I didn't check if they also fail for the wrong reason), and
> the following test which doesn't expect failure has an explicit "git
> checkout master" early on, which explains why it was not impacted by
> this problem.
>
>> Verbose output of the next test referencing HEAD,
>> "--merged is incompatible with --no-merged":
>>
>> fatal: malformed object name HEAD
>>
>> Which this commit corrects to:
>>
>> error: option `no-merged' is incompatible with --merged
>>
>> Signed-off-by: Aaron Lipman <alipman88@gmail.com>
>
> Description and actual fix make perfect sense.
Yeah, looks good. Of course, the affected test can be made more
defensive to protect the precondition it relies on from getting
broken by other tests (i.e. if it refers to HEAD, it should make
sure it is on an actual commit). Each test cleaning up after
itself is a good discipline to have, but what is "clean" is quite
subjective and depends on each test piece in the script X-<.
Thanks, will queue.
next prev parent reply other threads:[~2020-08-31 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 22:56 [PATCH] t3200: clean side effect of git checkout --orphan Aaron Lipman
2020-08-30 5:35 ` Eric Sunshine
2020-08-31 18:21 ` Junio C Hamano [this message]
2020-08-30 22:42 ` [PATCH v2] " Aaron Lipman
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=xmqqimcyfzgg.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=alipman88@gmail.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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).