All of lore.kernel.org
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Harald Nordgren <haraldnordgren@gmail.com>, peff@peff.net
Cc: git@vger.kernel.org, avarab@gmail.com, gitster@pobox.com,
	sunshine@sunshineco.com
Subject: Re: [PATCH v14 4/4] ls-remote: create '--sort' option
Date: Sat, 12 May 2018 10:45:23 +0200	[thread overview]
Message-ID: <b5555929-9f7c-1c4a-78e8-708ebdaaa9d2@web.de> (raw)
In-Reply-To: <20180409014226.2647-4-haraldnordgren@gmail.com>

Am 09.04.2018 um 03:42 schrieb Harald Nordgren:
> diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
> index 02106c922..83cd35c39 100755
> --- a/t/t5512-ls-remote.sh
> +++ b/t/t5512-ls-remote.sh

> @@ -170,14 +206,18 @@ test_expect_success 'overrides work between mixed transfer/upload-pack hideRefs'
>   	grep refs/tags/magic actual
>   '
>   
> +git fetch origin
>   test_expect_success 'ls-remote --symref' '
> -	cat >expect <<-\EOF &&
> +	cat >expect <<-EOF &&
>   	ref: refs/heads/master	HEAD
> -	1bd44cb9d13204b0fe1958db0082f5028a16eb3a	HEAD
> -	1bd44cb9d13204b0fe1958db0082f5028a16eb3a	refs/heads/master
> -	1bd44cb9d13204b0fe1958db0082f5028a16eb3a	refs/remotes/origin/HEAD
> -	1bd44cb9d13204b0fe1958db0082f5028a16eb3a	refs/remotes/origin/master
> -	1bd44cb9d13204b0fe1958db0082f5028a16eb3a	refs/tags/mark
> +	$(git rev-parse HEAD)	HEAD
> +	$(git rev-parse refs/heads/master)	refs/heads/master
> +	$(git rev-parse HEAD)	refs/remotes/origin/HEAD
> +	$(git rev-parse refs/remotes/origin/master)	refs/remotes/origin/master
> +	$(git rev-parse refs/tags/mark)	refs/tags/mark
> +	$(git rev-parse refs/tags/mark1.1)	refs/tags/mark1.1
> +	$(git rev-parse refs/tags/mark1.10)	refs/tags/mark1.10
> +	$(git rev-parse refs/tags/mark1.2)	refs/tags/mark1.2
>   	EOF
>   	git ls-remote --symref >actual &&
>   	test_cmp expect actual

Why is fetch called outside of the test?  Its output is shown among the
test messages, where it doesn't belong:

    ok 23 - overrides work between mixed transfer/upload-pack hideRefs
    From /home/lsr/src/git/t/trash directory.t5512-ls-remote/
     * [new branch]      master     -> origin/master
    ok 24 - ls-remote --symref

-- >8 --
Subject: [PATCH] t5512: run git fetch inside test

Do the preparatory fetch inside the test of ls-remote --symref to avoid
cluttering the test output and to be able to catch unexpected fetch
failures.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 t/t5512-ls-remote.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
index 83cd35c391..6a949484d0 100755
--- a/t/t5512-ls-remote.sh
+++ b/t/t5512-ls-remote.sh
@@ -206,8 +206,8 @@ test_expect_success 'overrides work between mixed transfer/upload-pack hideRefs'
 	grep refs/tags/magic actual
 '
 
-git fetch origin
 test_expect_success 'ls-remote --symref' '
+	git fetch origin &&
 	cat >expect <<-EOF &&
 	ref: refs/heads/master	HEAD
 	$(git rev-parse HEAD)	HEAD
-- 
2.17.0

  reply	other threads:[~2018-05-12  8:45 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-02  0:52 [PATCH] ls-remote: create option to sort by versions Harald Nordgren
2018-04-02  6:37 ` Ævar Arnfjörð Bjarmason
2018-04-02 16:26   ` Harald Nordgren
2018-04-02 17:32     ` Ævar Arnfjörð Bjarmason
2018-04-02 17:42       ` Harald Nordgren
2018-04-02 17:46     ` Jeff King
2018-04-02 18:32   ` Junio C Hamano
2018-04-02 20:03     ` Harald Nordgren
2018-04-02 22:11       ` [PATCH v5] ls-remote: create '--sort' option Harald Nordgren
2018-04-02 22:53         ` Eric Sunshine
2018-04-02 22:54           ` Eric Sunshine
2018-04-03  0:48       ` [PATCH v6] " Harald Nordgren
2018-04-02 21:05 ` [PATCH v4] " Harald Nordgren
2018-04-04 17:11 ` [PATCH v7] " Harald Nordgren
2018-04-04 17:18   ` Harald Nordgren
2018-04-04 17:47     ` Harald Nordgren
2018-04-04 18:56     ` Jeff King
2018-04-04 18:55   ` Jeff King
2018-04-04 23:01 ` [PATCH v8] " Harald Nordgren
2018-04-04 23:11   ` Harald Nordgren
2018-04-06 18:58     ` Jeff King
2018-04-06 18:58       ` [PATCH 1/3] ref-filter: use "struct object_id" consistently Jeff King
2018-04-06 18:59       ` [PATCH 2/3] ref-filter: make ref_array_item allocation more consistent Jeff King
2018-04-06 18:59       ` [PATCH 3/3] ref-filter: factor ref_array pushing into its own function Jeff King
2018-04-06 19:27         ` Derrick Stolee
2018-04-07 15:22           ` Harald Nordgren
2018-04-08 23:18         ` Junio C Hamano
2018-04-09  3:57           ` Jeff King
2018-04-04 23:32 ` [PATCH v9] ls-remote: create '--sort' option Harald Nordgren
2018-04-05  0:04 ` [PATCH v10] " Harald Nordgren
2018-04-07 16:42 ` [PATCH v11 1/4] ref-filter: use "struct object_id" consistently Harald Nordgren
2018-04-08  1:06   ` Eric Sunshine
2018-04-08 12:27     ` Harald Nordgren
2018-04-07 16:42 ` [PATCH v11 2/4] ref-filter: make ref_array_item allocation more consistent Harald Nordgren
2018-04-07 16:42 ` [PATCH v11 3/4] ref-filter: factor ref_array pushing into its own function Harald Nordgren
2018-04-07 16:42 ` [PATCH v11 4/4] ls-remote: create '--sort' option Harald Nordgren
2018-04-08  1:48   ` Eric Sunshine
2018-04-08 12:28 ` [PATCH v12 1/4] ref-filter: use "struct object_id" consistently Harald Nordgren
2018-04-08 12:28 ` [PATCH v12 2/4] ref-filter: make ref_array_item allocation more consistent Harald Nordgren
2018-04-08 12:28 ` [PATCH v12 3/4] ref-filter: factor ref_array pushing into its own function Harald Nordgren
2018-04-08 12:28 ` [PATCH v12 4/4] ls-remote: create '--sort' option Harald Nordgren
2018-04-08 22:16   ` Junio C Hamano
2018-04-09  0:09     ` Harald Nordgren
2018-04-09  0:48       ` Junio C Hamano
2018-04-09  2:31     ` Eric Sunshine
2018-04-08 23:58 ` [PATCH v13 1/4] ref-filter: use "struct object_id" consistently Harald Nordgren
2018-04-08 23:58 ` [PATCH v13 2/4] ref-filter: make ref_array_item allocation more consistent Harald Nordgren
2018-04-08 23:58 ` [PATCH v13 3/4] ref-filter: factor ref_array pushing into its own function Harald Nordgren
2018-04-08 23:58 ` [PATCH v13 4/4] ls-remote: create '--sort' option Harald Nordgren
2018-04-09  0:56   ` Junio C Hamano
2018-04-09  1:45     ` Harald Nordgren
2018-04-09  1:42 ` [PATCH v14 1/4] ref-filter: use "struct object_id" consistently Harald Nordgren
2018-04-09  1:42 ` [PATCH v14 2/4] ref-filter: make ref_array_item allocation more consistent Harald Nordgren
2018-04-11 17:57   ` Harald Nordgren
2018-04-11 18:07     ` Stefan Beller
2018-04-11 18:30       ` Todd Zullinger
2018-04-11 18:56       ` Eric Sunshine
2018-04-11 23:25         ` Junio C Hamano
2018-04-09  1:42 ` [PATCH v14 3/4] ref-filter: factor ref_array pushing into its own function Harald Nordgren
2018-04-09  1:42 ` [PATCH v14 4/4] ls-remote: create '--sort' option Harald Nordgren
2018-05-12  8:45   ` René Scharfe [this message]
2018-05-12  9:55     ` Jeff King

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=b5555929-9f7c-1c4a-78e8-708ebdaaa9d2@web.de \
    --to=l.s.r@web.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=haraldnordgren@gmail.com \
    --cc=peff@peff.net \
    --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.