git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	ether@cpan.org, Felipe Contreras <felipe.contreras@gmail.com>,
	philippe.vaucher@gmail.com,
	Ramkumar Ramachandra <artagnon@gmail.com>
Subject: Re: [PATCH] rebase -i: test "Nothing to do" case with autostash
Date: Tue, 20 May 2014 03:22:15 -0400	[thread overview]
Message-ID: <CAPig+cSWrc-W+9CZQ9vF-E3xcLY3OFoRMpHLb3K8Vsx3iz1Mjw@mail.gmail.com> (raw)
In-Reply-To: <1400568913-1340-1-git-send-email-Matthieu.Moy@imag.fr>

On Tue, May 20, 2014 at 2:55 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
> ---
> Ram's patch lacks a test. Here it is. Fails without Ram's patch, and
> passes with it.
>
> Can be squashed into Ram's patch.
>
>  t/t3420-rebase-autostash.sh | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh
> index 90eb264..c2e9a4c 100755
> --- a/t/t3420-rebase-autostash.sh
> +++ b/t/t3420-rebase-autostash.sh
> @@ -167,4 +167,21 @@ testrebase "" .git/rebase-apply
>  testrebase " --merge" .git/rebase-merge
>  testrebase " --interactive" .git/rebase-merge
>
> +test_expect_success 'Abort rebase with --autostash' '
> +       git log &&
> +       echo new-content >file0 &&
> +       (
> +               write_script abort-editor.sh <<-\EOF &&
> +                       echo > "$1"
> +               EOF
> +               GIT_EDITOR=\"$(pwd)/abort-editor.sh\" &&
> +               export GIT_EDITOR &&

Simpler (replace above two lines):

    test_set_editor "$(pwd)/abort-editor.sh" &&

> +               test_must_fail git rebase -i --autostash HEAD^ &&
> +               rm -f abort-editor.sh
> +       ) &&
> +       git status &&
> +       echo new-content >expected &&
> +       test_cmp expected file0
> +'
> +
>  test_done
> --
> 2.0.0.rc3.499.gd6dc9ad

  reply	other threads:[~2014-05-20  7:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 22:05 [PATCH] rebase -i: handle "Nothing to do" case with autostash Ramkumar Ramachandra
2014-05-20  6:55 ` [PATCH] rebase -i: test " Matthieu Moy
2014-05-20  7:22   ` Eric Sunshine [this message]
2014-05-20  7:49     ` [PATCH v2] " Matthieu Moy
2014-05-20 18:34       ` 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=CAPig+cSWrc-W+9CZQ9vF-E3xcLY3OFoRMpHLb3K8Vsx3iz1Mjw@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=artagnon@gmail.com \
    --cc=ether@cpan.org \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=philippe.vaucher@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 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).