unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 51497@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>,
	Dima Kogan <dima@secretsauce.net>,
	Wolfgang Scherer <wolfgang.scherer@gmx.de>
Subject: bug#51497: 29.0.50; (vc-print-log) broken over TRAMP
Date: Sun, 31 Oct 2021 17:05:18 +0100	[thread overview]
Message-ID: <87mtmp41tt.fsf@gmx.de> (raw)
In-Reply-To: <be570cd6-d170-7ff7-0729-77fb03d652b7@yandex.ru> (Dmitry Gutov's message of "Sun, 31 Oct 2021 15:26:55 +0300")

Dmitry Gutov <dgutov@yandex.ru> writes:

Hi Dmitry,

>> vc-git.el could declare a variable which determines, whether the git
>> command supports :(literal) (perhaps it does already). A user could
>> change this variable via connection-local settings.
>
> We normally use 'vc-git--program-version' for this.
>
> Can we define the variable 'vc-git--program-version' as
> connection-local or something?

--8<---------------cut here---------------start------------->8---
(defun vc-git--program-version ()
  (let ((current
	 (if (file-remote-p default-directory)
	     (with-connection-local-variables
	      (and (local-variable-p 'vc-git--program-version)
		   vc-git--program-version))
	   vc-git--program-version)))
    (or current
	(let ((version-string
               (vc-git--run-command-string nil "version")))
          (setq version-string
		(if (and version-string
			 ;; Git for Windows appends ".windows.N" to the
			 ;; numerical version reported by Git.
			 (string-match
                          "git version \\([0-9.]+\\)\\(\\.windows\\.[0-9]+\\)?$"
                          version-string))
                    (match-string 1 version-string)
                  "0"))
	  (if (file-remote-p default-directory)
	      (let ((profile (gensym "connection-local-profile-")))
		(connection-local-set-profile-variables
		 profile `((vc-git--program-version . ,version-string))) ;
		(connection-local-set-profiles
		 (connection-local-criteria-for-default-directory) profile))
	    (setq vc-git--program-version version-string))
	  version-string))))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.





  reply	other threads:[~2021-10-31 16:05 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 [this message]
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

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: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtmp41tt.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=51497@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=dima@secretsauce.net \
    --cc=larsi@gnus.org \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).