all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: lists@dima.secretsauce.net, 51497@debbugs.gnu.org,
	larsi@gnus.org, wolfgang.scherer@gmx.de
Subject: bug#51497: 29.0.50; (vc-print-log) broken over TRAMP
Date: Sun, 7 Nov 2021 01:19:26 +0300	[thread overview]
Message-ID: <f942558f-1e76-3294-27da-bee3c8945e1c@yandex.ru> (raw)
In-Reply-To: <83lf219i3u.fsf@gnu.org>

On 06.11.2021 22:52, Eli Zaretskii wrote:
>> Cc: lists@dima.secretsauce.net, 51497@debbugs.gnu.org, larsi@gnus.org,
>>   wolfgang.scherer@gmx.de
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Sat, 6 Nov 2021 22:44:55 +0300
>>
>>> I'm a bit worried by the function relying on the fact that
>>> default-directory is the directory of the repository.  Wouldn't it be
>>> better to explicitly let-bind it inside the function?
>>
>> We could, but notice how most of vc-git-* functions don't bind
>> default-directory, thus relying on its implicit value. It just how VC
>> works: expecting default-directory to have the right value around the calls.
> 
> How certain are you that default-directory has the right value?
> Because if it doesn't, AFAIU all the connection-specific stuff will
> fall apart.

Reasonably, but not 100%. Especially with third-party code which calls 
into VC (it could adapt independently from Emacs releases, though).

We could try to bind default-directory inside vc-git--literal-pathspec, 
but this approach is not 100% reliable either: for all I know, sometimes 
FILE will be a relative name (we even have a file-name-absolute-p check 
inside).

But what's the worst thing that can happen because of this? Suppose some 
caller will leave default-directory at a wrong value. Then 
vc-git--program-version will return the version from a wrong host. And 
some particular command (probably a less popular one) will remain broken 
on remote CentOS 7 machines. That's still an improvement compared to the 
current sutuation.

So I suggest we push the proposed change to emacs-28 and then maybe back 
it out (or modify as necessary) if problems arise.

>>> A (perhaps safer) alternative for emacs-28 would be not to use
>>> :(literal) for remote repositories.  What are the disadvantages of
>>> that?
>>
>> That would mean leaving bug#39452 unfixed on remote hosts.
> 
> Only for files with wildcard characters in their names.  How
> frequently does that happen?  Also, it will be only unsolved in Emacs
> 28.

I've never seen this in practice, but some other categories of users 
might encounter it more often (e.g. science people, who tend to use more 
exotic files names). And when one does see it, it must be very annoying 
to debug.





      parent reply	other threads:[~2021-11-06 22:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30  1:24 bug#51497: 29.0.50; (vc-print-log) broken over TRAMP dima
2021-10-30 12:48 ` Lars Ingebrigtsen
2021-10-30 13:21   ` Dmitry Gutov
2021-10-30 19:01   ` Dima Kogan
2021-10-31  0:56     ` Dmitry Gutov
2021-10-31  6:58       ` Dima Kogan
2021-10-31  8:16         ` Michael Albinus
2021-10-31 12:26           ` Dmitry Gutov
2021-10-31 16:05             ` Michael Albinus
2021-11-03  2:00               ` Dmitry Gutov
2021-11-03 17:09                 ` Michael Albinus
2021-11-05  2:00                   ` Dmitry Gutov
2021-11-03  2:03         ` Dmitry Gutov
2021-11-03  3:03           ` Dima Kogan
2021-11-03 12:06             ` Dmitry Gutov
2021-11-06 13:22               ` Dmitry Gutov
2021-11-06 15:51                 ` Eli Zaretskii
2021-11-06 19:44                   ` Dmitry Gutov
2021-11-06 19:52                     ` Eli Zaretskii
2021-11-06 22:11                       ` Andy Moreton
2021-11-06 22:21                         ` Dmitry Gutov
2021-11-06 23:03                           ` Andy Moreton
2021-11-07  0:11                             ` Dmitry Gutov
2021-11-07  6:47                               ` Eli Zaretskii
2021-11-07 10:43                                 ` Andy Moreton
2021-11-07 22:36                                 ` Dmitry Gutov
2021-11-08 12:49                                   ` Eli Zaretskii
2021-11-08 17:30                                     ` Dmitry Gutov
2021-11-08 18:18                                       ` Eli Zaretskii
2021-12-23 10:28                                         ` Lars Ingebrigtsen
2021-12-26  0:53                                           ` Dmitry Gutov
2021-12-27  1:36                                         ` Dmitry Gutov
2022-01-03  3:59                                           ` Dmitry Gutov
2022-01-03 21:15                                             ` Dima Kogan
2022-01-03 22:51                                               ` Dmitry Gutov
2022-01-04  3:28                                                 ` Eli Zaretskii
2022-01-05  2:09                                                   ` Dmitry Gutov
2022-01-21 13:50                                                     ` Lars Ingebrigtsen
2022-01-21 14:11                                                       ` Dmitry Gutov
2022-01-03 21:16                                             ` Andy Moreton
2021-11-07  6:43                             ` Eli Zaretskii
2021-11-07 10:45                               ` Andy Moreton
2021-11-07  6:31                         ` Eli Zaretskii
2021-11-06 22:19                       ` Dmitry Gutov [this message]

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=f942558f-1e76-3294-27da-bee3c8945e1c@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=51497@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=lists@dima.secretsauce.net \
    --cc=wolfgang.scherer@gmx.de \
    /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.