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


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
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: bug#51497: 29.0.50; (vc-print-log) broken over TRAMP
Date: Wed, 3 Nov 2021 05:00:49 +0300
Hi Michael,

On 31.10.2021 19:05, Michael Albinus wrote:
> (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))))

I wonder if we could have some helper that is more succinct. One that 
didn't require the client code to auto-generate the profile name, for 
instance.




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.