git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>,
	Emily Shaffer <emilyshaffer@google.com>
Cc: "Jean-Noël AVILA" <jn.avila@free.fr>, git@vger.kernel.org
Subject: Re: Regression in v2.26.0-rc0 and Magit
Date: Fri, 13 Mar 2020 12:07:49 -0700	[thread overview]
Message-ID: <xmqqy2s4axa2.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <xmqq36accdpt.fsf@gitster.c.googlers.com> (Junio C. Hamano's message of "Fri, 13 Mar 2020 11:27:26 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
> ...
> 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(+)
> ...
> +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

This is outside the scope of fixing the regression e0020b2f
("prefix_path: show gitdir when arg is outside repo", 2020-02-14)
brought in, but I wonder if this last piece should even fail in the
first place.

If you give "." instead of ".." to these commands, they behave as if
we did so from the top-level of the working tree, i.e. these are
equivalent:

    git -C .git ls-files -- .
    git -C .git/info/ ls-files -- .
    git ls-files -- .

which somehow does not sound quite right, but that is how tools
written in the past 15 years expect and is hard to change?

That does not still explain why Magit (which is sufficiently mature)
is expecting "cd .git && ls-files .." to show the entire working
tree, though.



  parent reply	other threads:[~2020-03-13 19:07 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 [this message]
2020-03-14  5:57         ` Kyle Meyer
2020-03-15 10:58       ` SZEDER Gábor
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=xmqqy2s4axa2.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=emilyshaffer@google.com \
    --cc=git@vger.kernel.org \
    --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).