git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jean-Noël AVILA" <jn.avila@free.fr>,
	git@vger.kernel.org, "Jonathan Nieder" <jrnieder@gmail.com>,
	"Emily Shaffer" <emilyshaffer@google.com>
Subject: Re: Regression in v2.26.0-rc0 and Magit
Date: Sat, 14 Mar 2020 05:57:40 +0000	[thread overview]
Message-ID: <87h7yr8omj.fsf@kyleam.com> (raw)
In-Reply-To: <xmqqy2s4axa2.fsf@gitster.c.googlers.com>

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

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

The specific ls-files call that seems to trigger the segfault on Magit's
end is equivalent to

  cd .git && git ls-files --error-unmatch -- $PWD/COMMIT_EDITMSG

The code is running ls-files to ask whether the file is tracked, which
of course isn't a sensible thing to do outside of the working tree.
I'll propose a change on Magit's end to avoid doing so.

[ A few more specifics that might be of interest to Magit users ]

This happens in magit-auto-revert-mode.  When visiting a file in .git/
(e.g., COMMIT_EDITMSG when committing), magit-auto-revert-mode decides
whether to turn on auto-revert-mode in the same way it does for other
files, magit-turn-on-auto-revert-mode-if-desired.  That function doesn't
distinguish whether the file is in .git or the working tree, leading to
the odd "is tracked file?" query above.

  reply	other threads:[~2020-03-15  1:33 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 [this message]
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=87h7yr8omj.fsf@kyleam.com \
    --to=kyle@kyleam.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).