All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] t4151: document a pair of am --abort bugs
Date: Wed, 08 Sep 2021 09:33:09 -0700	[thread overview]
Message-ID: <xmqq1r5z58oq.fsf@gitster.g> (raw)
In-Reply-To: <CABPp-BGD9WdeiquX0eiMz2458pDhJpjOXGyUOqoXu52ohZVCsQ@mail.gmail.com> (Elijah Newren's message of "Wed, 8 Sep 2021 01:00:43 -0700")

Elijah Newren <newren@gmail.com> writes:

> On Wed, Sep 8, 2021 at 12:02 AM Junio C Hamano <gitster@pobox.com> wrote:
>>
>> "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>>
>> > +test_expect_failure 'git am --abort returns us to a clean state' '
>> > +     git checkout changes &&
>> > +     git format-patch -1 --stdout conflicting >changes.mbox &&
>> > +     test_must_fail git am --3way changes.mbox &&
>> > +
>> > +     # Make a change related to the rest of the am work
>> > +     echo related change >>file-2 &&
>> > +
>> > +     # Abort, and expect the related change to go away too
>> > +     git am --abort &&
>> > +     git status --porcelain -uno >actual &&
>> > +     test_must_be_empty actual
>>
>> This test makes me worried.  It is perfectly normal for "am" to be
>> asked to work in a dirty working tree as long as the index is clean
>> and the working tree files that are involved in the patch are
>> unmodified.
>
> Ah, I think I am just too used to rebase where it refuses to start if
> the working tree isn't clean, assumed the same with am (which I don't
> use that much), and then projected from there.
>
> I'll drop the second test; thanks for the explanation.

Actually, if you test that unrelated dirty files are kept, then the
test is a welcome addition.  "returns us to a 'clean' state" needs a
bit different title, though.

Thanks.

  reply	other threads:[~2021-09-08 16:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  2:17 [PATCH 0/2] A pair of git am --abort issues Elijah Newren via GitGitGadget
2021-09-08  2:17 ` [PATCH 1/2] t4151: document a pair of am --abort bugs Elijah Newren via GitGitGadget
2021-09-08  5:13   ` Bagas Sanjaya
2021-09-08  5:24     ` Elijah Newren
2021-09-08  7:02   ` Junio C Hamano
2021-09-08  8:00     ` Elijah Newren
2021-09-08 16:33       ` Junio C Hamano [this message]
2021-09-08  2:17 ` [PATCH 2/2] am: fix incorrect exit status on am fail to abort Elijah Newren via GitGitGadget
2021-09-08 16:33   ` Junio C Hamano
2021-09-08  8:08 ` [PATCH 0/2] A pair of git am --abort issues Johannes Schindelin
2021-09-10 10:31 ` [PATCH v2 0/3] " Elijah Newren via GitGitGadget
2021-09-10 10:31   ` [PATCH v2 1/3] git-am.txt: clarify --abort behavior Elijah Newren via GitGitGadget
2021-09-10 10:31   ` [PATCH v2 2/3] t4151: add a few am --abort tests Elijah Newren via GitGitGadget
2021-09-10 10:31   ` [PATCH v2 3/3] am: fix incorrect exit status on am fail to abort Elijah Newren via GitGitGadget
2021-09-13 12:08   ` [PATCH v2 0/3] A pair of git am --abort issues Johannes Schindelin

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=xmqq1r5z58oq.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@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 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.