git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Chris Torek <chris.torek@gmail.com>
Subject: Re: [PATCH v2 1/2] t: don't spuriously close and reopen quotes
Date: Thu, 6 Aug 2020 16:26:15 -0400	[thread overview]
Message-ID: <CAPig+cSjHg2-WYqdkZAS0ye1goj_=5RN3mdjt0-4kSBqNm6WLg@mail.gmail.com> (raw)
In-Reply-To: <c60416a111bada9624b8b64235ac5c4dd3dedac4.1596742823.git.martin.agren@gmail.com>

On Thu, Aug 6, 2020 at 4:09 PM Martin Ågren <martin.agren@gmail.com> wrote:
> diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
> @@ -364,7 +364,7 @@ test_expect_success 'set up an unresolved merge' '
>         fifth=$(git rev-parse fifth) &&
> -       echo "$fifth            branch 'fifth' of ." |
> +       echo "$fifth            branch fifth of ." |
>         git fmt-merge-msg >msg &&

This one is a bit weird. It really seems as if the intent was to quote
the word "fifth" in the merge message, so dropping the quotes
altogether seems wrong. However, the file 'msg' is never even
consulted in this test (or any other test), so is this just "dead
code" (including the leading 'fifth=' assignment which also is
otherwise unused outside the 'echo')?

> diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
> @@ -213,7 +213,7 @@ test_expect_success 'fetch tags when there is no tags' '
>  test_expect_success 'fetch following tags' '
>         cd "$D" &&
> -       git tag -a -m 'annotated' anno HEAD &&
> +       git tag -a -m "annotated" anno HEAD &&

There are a fair number of these quoted single-token arguments
containing no special characters which don't actually need to be
quoted at all, so an alternative would be simply to drop the quotes
altogether, making the commands less syntactically noisy. However,
that might be outside the intended scope of this change.

  reply	other threads:[~2020-08-06 20:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01 22:06 [PATCH] t1450: fix quoting of NUL byte when corrupting pack Martin Ågren
2020-08-02  0:45 ` Junio C Hamano
2020-08-02 14:30   ` Martin Ågren
2020-08-02 17:22     ` Eric Sunshine
2020-08-06 20:08     ` [PATCH v2 0/2] t: don't spuriously close and reopen quotes Martin Ågren
2020-08-06 20:08       ` [PATCH v2 1/2] " Martin Ågren
2020-08-06 20:26         ` Eric Sunshine [this message]
2020-08-07  8:45           ` Martin Ågren
2020-08-07 16:17             ` Eric Sunshine
2020-08-07 17:16               ` Junio C Hamano
2020-08-06 20:08       ` [PATCH v2 2/2] t4104: modernize and simplify quoting Martin Ågren
2020-08-02  1:00 ` [PATCH] t1450: fix quoting of NUL byte when corrupting pack Chris Torek
2020-08-02  1:02   ` Chris Torek
2020-08-02 14:35     ` Martin Ågren
2020-08-02 16:20       ` Chris Torek
2020-08-02 17:57         ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cSjHg2-WYqdkZAS0ye1goj_=5RN3mdjt0-4kSBqNm6WLg@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=chris.torek@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.agren@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).