All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Øystein Walle" <oystwa@gmail.com>, "Git List" <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] status: print stash info with --porcelain=v2 --show-stash
Date: Thu, 21 Oct 2021 17:29:45 -0700	[thread overview]
Message-ID: <xmqq4k99gava.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cQQurJuKieFcnZ8_10CaJA7vZ2kV=S+AaHVX3nhsVUG-Q@mail.gmail.com> (Eric Sunshine's message of "Thu, 21 Oct 2021 20:05:53 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

>> +       test_when_finished "git stash pop && git stash pop" &&
>
> If it's indeed important to clean up the stashes when the test
> finishes, then the test_when_finished() invocation should probably be
> a bit more robust...
>
>> +       git stash -- file_x &&
>> +       git stash &&
>
> ... since, as it is now, if an error occurs between these two
> git-stash invocations or before them, then there will only be zero or
> one stashes, so the double stash-pop by test_when_finished() will
> itself errout out. Better, perhaps to do this:
>
>     test_when_finished "git stash pop && git stash pop || :" &&
>
>> +       git status --porcelain=v2 --branch --show-stash --untracked-files=no >actual &&
>> +       test_cmp expect actual
>> +'

There is no "I do not care what is in the stash right now, just
clear all"?

  reply	other threads:[~2021-10-22  0:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 22:25 [PATCH 0/2] Print stash info in the v2 porcelain format Øystein Walle
2021-10-21 22:25 ` [PATCH 1/2] status: count stash entries in separate function Øystein Walle
2021-10-21 23:38   ` Junio C Hamano
2021-10-21 22:25 ` [PATCH 2/2] status: print stash info with --porcelain=v2 --show-stash Øystein Walle
2021-10-21 23:47   ` Junio C Hamano
2021-10-22  0:05   ` Eric Sunshine
2021-10-22  0:29     ` Junio C Hamano [this message]
2021-10-22  1:19       ` Eric Sunshine

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