public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Joel Teichroeb <joel@teichroeb•net>
Cc: "Git Mailing List" <git@vger•kernel.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail•com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx•de>,
	"Jeff King" <peff@peff•net>,
	"Christian Couder" <christian.couder@gmail•com>
Subject: Re: [PATCH v4 1/5] stash: add test for stash create with no files
Date: Tue, 13 Jun 2017 12:31:35 -0700	[thread overview]
Message-ID: <xmqqk24f65wo.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170608005535.13080-2-joel@teichroeb.net> (Joel Teichroeb's message of "Wed, 7 Jun 2017 17:55:31 -0700")

Joel Teichroeb <joel@teichroeb•net> writes:

> Ensure the command gives the correct return code

OK.  When you know what the correct return code is, we'd prefer to
see it spelled out, i.e.

    Ensure that the command succeeds.

Or did you mean that the command outputs nothing?

The test itself looks obviously correct ;-)

> Signed-off-by: Joel Teichroeb <joel@teichroeb•net>
> ---
>  t/t3903-stash.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
> index 3b4bed5c9a..cc923e6335 100755
> --- a/t/t3903-stash.sh
> +++ b/t/t3903-stash.sh
> @@ -444,6 +444,14 @@ test_expect_failure 'stash file to directory' '
>  	test foo = "$(cat file/file)"
>  '
>  
> +test_expect_success 'stash create - no changes' '
> +	git stash clear &&
> +	test_when_finished "git reset --hard HEAD" &&
> +	git reset --hard &&
> +	git stash create >actual &&
> +	test_must_be_empty actual
> +'
> +
>  test_expect_success 'stash branch - no stashes on stack, stash-like argument' '
>  	git stash clear &&
>  	test_when_finished "git reset --hard HEAD" &&

  reply	other threads:[~2017-06-13 19:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08  0:55 [PATCH v4 0/5] Implement git stash as a builtin command Joel Teichroeb
2017-06-08  0:55 ` [PATCH v4 1/5] stash: add test for stash create with no files Joel Teichroeb
2017-06-13 19:31   ` Junio C Hamano [this message]
2017-06-08  0:55 ` [PATCH v4 2/5] stash: Add a test for when apply fails during stash branch Joel Teichroeb
2017-06-13 19:40   ` Junio C Hamano
2017-06-13 19:54     ` Joel Teichroeb
2017-06-08  0:55 ` [PATCH v4 3/5] stash: add test for stashing in a detached state Joel Teichroeb
2017-06-13 19:45   ` Junio C Hamano
2017-06-13 19:48     ` Joel Teichroeb
2017-06-13 20:58       ` Junio C Hamano
2017-06-08  0:55 ` [PATCH v4 4/5] merge: close the index lock when not writing the new index Joel Teichroeb
2017-06-13 19:47   ` Junio C Hamano
2017-06-08  0:55 ` [PATCH v4 5/5] stash: implement builtin stash Joel Teichroeb
2017-06-11 21:27   ` Thomas Gummerer
2017-06-20  2:37     ` Joel Teichroeb
2017-06-25 21:09       ` Thomas Gummerer
2017-06-26  7:53         ` Matthieu Moy
2017-06-27 14:53           ` Thomas Gummerer
2017-06-16 16:15   ` Junio C Hamano
2017-06-16 22:47   ` Junio C Hamano
2017-06-19 13:16     ` Johannes Schindelin
2017-06-19 13:20       ` Jeff King
2017-06-20  2:12     ` Joel Teichroeb
2017-06-22 17:23       ` Junio C Hamano
2017-06-22 17:07   ` Junio C Hamano
2017-06-11 17:40 ` [PATCH v4 0/5] Implement git stash as a builtin command Joel Teichroeb

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=xmqqk24f65wo.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=avarab@gmail$(echo .)com \
    --cc=christian.couder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=joel@teichroeb$(echo .)net \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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