all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Dmitry Gutov <dmitry@gutov.dev>
Cc: 68174@debbugs.gnu.org, juri@linkov.net
Subject: bug#68174: 30.0.50; Project and VC disagree about what repository we're in
Date: Tue, 02 Jan 2024 08:55:42 +0000	[thread overview]
Message-ID: <8734vgqfld.fsf@zephyr.silentflame.com> (raw)
In-Reply-To: <8c47be44-ea77-48b5-bbdf-53b4e245f7a7@gutov.dev> (Dmitry Gutov's message of "Tue, 2 Jan 2024 05:31:20 +0200")

Hello,

On Tue 02 Jan 2024 at 05:31am +02, Dmitry Gutov wrote:

> I general, the problem looks unsolvable (or at least hard) because various
> VC-related buffers look back on the fileset that spawned them through the
> variable vc-parent-buffer. And that one is often just set to the buffer that
> was previous before the current one was created (in vc-setup-buffer).

Hmm.  This would be unfortunate.

> This particular case though seems fixed with this patch, please test:
>
> diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
> index 3cd835a9d6b..82051740b8f 100644
> --- a/lisp/vc/vc.el
> +++ b/lisp/vc/vc.el
> @@ -1074,6 +1074,7 @@ vc-expand-dirs
>
>  (defvar vc-dir-backend)
>  (defvar log-view-vc-backend)
> +(defvar log-view-vc-fileset)
>  (defvar log-edit-vc-backend)
>  (defvar diff-vc-backend)
>  (defvar diff-vc-revisions)
> @@ -1155,6 +1156,8 @@ vc-deduce-fileset
>  	      (vc-state buffer-file-name)
>  	      (vc-checkout-model backend buffer-file-name))
>  	(list backend (list buffer-file-name))))
> +     ((derived-mode-p 'log-view-mode)
> +      (list log-view-vc-backend log-view-vc-fileset))
>       ((and (buffer-live-p vc-parent-buffer)
>             ;; FIXME: Why this test?  --Stef
>             (or (buffer-file-name vc-parent-buffer)

Yup, that works, thanks!

-- 
Sean Whitton





  reply	other threads:[~2024-01-02  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-31 13:26 bug#68174: 30.0.50; Project and VC disagree about what repository we're in Sean Whitton
2024-01-02  3:31 ` Dmitry Gutov
2024-01-02  8:55   ` Sean Whitton [this message]
2024-01-02 13:10     ` Dmitry Gutov
2024-01-02 13:28       ` Eli Zaretskii
2024-01-03  0:13         ` Dmitry Gutov
2024-01-03 12:41           ` Eli Zaretskii

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=8734vgqfld.fsf@zephyr.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=68174@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=juri@linkov.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.