[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60897: 29.0.60; vc-revert fails to revert buffer
From: |
Eli Zaretskii |
Subject: |
bug#60897: 29.0.60; vc-revert fails to revert buffer |
Date: |
Mon, 23 Jan 2023 15:24:05 +0200 |
> From: Juri Linkov <juri@linkov.net>
> Cc: epg@pretzelnet.org, 60897@debbugs.gnu.org
> Date: Mon, 23 Jan 2023 09:51:30 +0200
>
> >> > (defun vc-resynch-buffer (file &optional keep noquery reset-vc-info)
> >> > "If FILE is currently visited, resynch its buffer."
> >> > + (unless (file-name-absolute-p file)
> >> > + (setq file (expand-file-name file (vc-root-dir))))
> >> > (if (string= buffer-file-name file)
> >> > (vc-resynch-window file keep noquery reset-vc-info)
> >> > (if (file-directory-p file)
> >>
> >> Eli, is this ok for the emacs-29 branch? I'm unsure because
> >> vc-resynch-buffer is used in too many places, so this change
> >> is not localized to vc-revert.
> >
> > You could use the expanded file name only for the purposes of the
> > string= call, no? Then the effect of this change would be very local
> > and thus safer.
>
> There is another string= call that fails inside vc-resynch-window
> called from vc-resynch-buffer.
How about replacing string= in these two cases with something smarter,
which would expand-file-name? Comparing file names as simple strings
is wrought with trouble anyway.
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Eric Gillespie, 2023/01/17
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Juri Linkov, 2023/01/18
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Eric Gillespie, 2023/01/20
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Juri Linkov, 2023/01/22
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Eli Zaretskii, 2023/01/22
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Juri Linkov, 2023/01/23
- bug#60897: 29.0.60; vc-revert fails to revert buffer,
Eli Zaretskii <=
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Juri Linkov, 2023/01/24
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Eli Zaretskii, 2023/01/24
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Juri Linkov, 2023/01/24
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Eli Zaretskii, 2023/01/24
- bug#60897: 29.0.60; vc-revert fails to revert buffer, Juri Linkov, 2023/01/24