From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jonathan Nieder" <jrnieder@gmail.com>,
"Jean-Noël AVILA" <jn.avila@free.fr>,
git@vger.kernel.org, "Emily Shaffer" <emilyshaffer@google.com>
Subject: Re: Regression in v2.26.0-rc0 and Magit
Date: Sun, 15 Mar 2020 11:58:03 +0100 [thread overview]
Message-ID: <20200315105803.GJ3122@szeder.dev> (raw)
In-Reply-To: <xmqq36accdpt.fsf@gitster.c.googlers.com>
On Fri, Mar 13, 2020 at 11:27:26AM -0700, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > Jonathan Nieder <jrnieder@gmail.com> writes:
> >
> >> Junio, can you fast-track that fix to "master"? Emily, can you add a
> >> test?
> >
> > Thanks, indeed it has been waiting for tests. We have a few more
> > business days before -rc2, so...
> >
> > * es/outside-repo-errmsg-hints (2020-03-03) 1 commit
> > - prefix_path: show gitdir if worktree unavailable
> >
> > An earlier update to show the location of working tree in the error
> > message did not consider the possibility that a git command may be
> > run in a bare repository, which has been corrected.
> >
> > May want a test or two.
>
> If nobody complains in the coming 4 hours or so, I'll squash this in
> to e6c57b49 ("prefix_path: show gitdir if worktree unavailable",
> 2020-03-02) and mark the topic as "ready for 'next'".
>
> Thanks.
>
> t/t6136-pathspec-in-bare.sh | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/t/t6136-pathspec-in-bare.sh b/t/t6136-pathspec-in-bare.sh
> new file mode 100755
> index 0000000000..d9e03132b7
> --- /dev/null
> +++ b/t/t6136-pathspec-in-bare.sh
> @@ -0,0 +1,30 @@
> +#!/bin/sh
> +
> +test_description='diagnosing out-of-scope pathspec'
> +
> +. ./test-lib.sh
> +
> +test_expect_success 'setup a bare and non-bare repository' '
> + test_commit file1 &&
> + git clone --bare . bare
> +'
> +
> +test_expect_success 'log and ls-files in a bare repository' '
> + (
> + cd bare &&
> + test_must_fail git log -- .. &&
> + test_must_fail git ls-files -- ..
> + ) >out 2>err &&
> + test_i18ngrep "outside repository" err
I think it would be better to write this test as:
(
cd bare &&
test_must_fail git log -- .. 2>err &&
test_i18ngrep "outside repository" err &&
test_must_fail git ls-files -- .. 2>err &&
test_i18ngrep "outside repository" err
)
because this way we make sure that both commands fail with the error
we expect.
> +'
> +
> +test_expect_success 'log and ls-files in .git directory' '
> + (
> + cd .git &&
> + test_must_fail git log -- .. &&
> + test_must_fail git ls-files -- ..
> + ) >out 2>err &&
> + test_i18ngrep "outside repository" err
> +'
> +
> +test_done
next prev parent reply other threads:[~2020-03-15 10:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 22:55 Regression in v2.26.0-rc0 and Magit Jean-Noël AVILA
2020-03-12 23:35 ` Jonathan Nieder
2020-03-13 0:02 ` Junio C Hamano
2020-03-13 18:27 ` Junio C Hamano
2020-03-13 19:02 ` Jonathan Nieder
2020-03-13 19:07 ` Junio C Hamano
2020-03-14 5:57 ` Kyle Meyer
2020-03-15 10:58 ` SZEDER Gábor [this message]
2020-03-15 16:35 ` 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=20200315105803.GJ3122@szeder.dev \
--to=szeder.dev@gmail.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jn.avila@free.fr \
--cc=jrnieder@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).