git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
	"Jens Krüger" <Jens.Krueger@frm2.tum.de>
Subject: Re: [PATCH] t2028: tighten grep expression to make "move worktree" test more robust
Date: Tue, 3 Apr 2018 17:21:08 +0200	[thread overview]
Message-ID: <CACsJy8DszXXK2htRupg8FhdcSgYweCv4FPAA_ZG23YKGz7AG=Q@mail.gmail.com> (raw)
In-Reply-To: <20180403092541.43920-1-sunshine@sunshineco.com>

On Tue, Apr 3, 2018 at 11:25 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
> Following a rename of worktree "source" to "destination", the "move
> worktree" test uses grep to verify that the output of "git worktree list
> --porcelain" does not contain "source" (and does contain "destination").
> Unfortunately, the grep expression is too loose and can match
> unexpectedly. For example, if component of the test trash directory path
> matches "source" (e.g. "/home/me/sources/git/t/trash*"), then the test
> will be fooled into thinking that "source" still exists. Tighten the
> expression to avoid such accidental matches.
>
> While at it, drop an unused variable ("toplevel") from the test and
> tighten a similarly too-loose expression in a related test.
>
> Reported-by: Jens Krüger <Jens.Krueger@frm2.tum.de>
> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
> ---
>
> t2028 in 2.17.0 can be fooled into failing depending upon the path of
> the test's trash directory. The problem is with the test being too
> loose, not with Git itself. Problem report and diagnosis here[1].
>
> [1]: https://public-inbox.org/git/26a00c2b-c588-68d5-7085-22310c20e6df@frm2.tum.de/T/#m994cdb29f141656b0ab48dd0d152432c7e86fc20

Thanks both. It was great to scroll to the latest mails and saw that I
didn't have to do anything else :)
-- 
Duy

      reply	other threads:[~2018-04-03 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03  9:25 [PATCH] t2028: tighten grep expression to make "move worktree" test more robust Eric Sunshine
2018-04-03 15:21 ` Duy Nguyen [this message]

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='CACsJy8DszXXK2htRupg8FhdcSgYweCv4FPAA_ZG23YKGz7AG=Q@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=Jens.Krueger@frm2.tum.de \
    --cc=git@vger.kernel.org \
    --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 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).