Re: Regression in v2.26.0-rc0 and Magit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 13, 2020, 18:27 UTC
- Message-ID
- <xmqq36accdpt.fsf@gitster.c.googlers.com>
- In-Reply-To
- <xmqqk13pdsw1.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> 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 +' + +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