GNU bug report logs - #51497
29.0.50; (vc-print-log) broken over TRAMP

Previous Next

Package: emacs;

Reported by: dima <at> secretsauce.net

Date: Sat, 30 Oct 2021 01:26:02 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 51497 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 51497 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Dima Kogan <dima <at> secretsauce.net>, Wolfgang Scherer <wolfgang.scherer <at> gmx.de>
Subject: Re: bug#51497: 29.0.50; (vc-print-log) broken over TRAMP
Date: Sun, 31 Oct 2021 17:05:18 +0100
Dmitry Gutov <dgutov <at> 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.




This bug report was last modified 3 years and 182 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.