Subject: 28.0.50; vc-print-log shows empty log
From: Michael Albinus <[email-masked]>
To: [email-masked]
Date: Sun, 10 Oct 2021 09:46:26 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

This has been reported on the Tramp mailing list, see
<https://lists.gnu.org/archive/html/tramp-devel/2021-10/msg00026.html>.

If you run Emacs on MS Windows, and you try to print the git log of a
remote file, you don't get anything. This is because vc-print-log has
emitted the following command:

--8<---------------cut here---------------start------------->8---
git --no-pager log --no-color -n 2000 -- \:\(literal\)c\:/tmp/tramp/README
--8<---------------cut here---------------end--------------->8---

See the leading drive letter "c:" in the file name. The problem is
`vc-git--literal-pathspec', which calls `expand-file-name' on the
*local* part of the remote file name.

A fix could be

--8<---------------cut here---------------start------------->8---
(defun vc-git--literal-pathspec (file)
  "Prepend :(literal) path magic to FILE."
  ;; Good example of file name that needs this: "test[56].xx".
  (when file
    ;; Expand abbreviated file names.
    (concat ":(literal)" (file-local-name (expand-file-name file)))))
--8<---------------cut here---------------end--------------->8---

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
 of 2021-09-26 built on gandalf
Repository revision: 94af99b298381d7d8e08b6d76de00906c74d9421
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Fedora 34 (Workstation Edition)

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER
PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8

Major mode: Message

Minor modes in effect:
  async-bytecomp-package-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  gnus-message-citation-mode: t
  mml-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  icomplete-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: message-do-auto-fill
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/albinus/.emacs.d/elpa/magit-20211004.1956/magit-section-pkg hides /home/albinus/.emacs.d/elpa/magit-section-20211004.1955/magit-section-pkg
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-crypt hides /home/albinus/src/tramp/lisp/tramp-crypt
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sshfs hides /home/albinus/src/tramp/lisp/tramp-sshfs
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sudoedit hides /home/albinus/src/tramp/lisp/tramp-sudoedit
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-fuse hides /home/albinus/src/tramp/lisp/tramp-fuse
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-archive hides /home/albinus/src/tramp/lisp/tramp-archive
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-cmds hides /home/albinus/src/tramp/lisp/tramp-cmds
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-uu hides /home/albinus/src/tramp/lisp/tramp-uu
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-cache hides /home/albinus/src/tramp/lisp/tramp-cache
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-gvfs hides /home/albinus/src/tramp/lisp/tramp-gvfs
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-smb hides /home/albinus/src/tramp/lisp/tramp-smb
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-rclone hides /home/albinus/src/tramp/lisp/tramp-rclone
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-adb hides /home/albinus/src/tramp/lisp/tramp-adb
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-integration hides /home/albinus/src/tramp/lisp/tramp-integration
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/trampver hides /home/albinus/src/tramp/lisp/trampver
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-compat hides /home/albinus/src/tramp/lisp/tramp-compat
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-ftp hides /home/albinus/src/tramp/lisp/tramp-ftp
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp hides /home/albinus/src/tramp/lisp/tramp
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sh hides /home/albinus/src/tramp/lisp/tramp-sh
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-loaddefs hides /home/albinus/src/tramp/lisp/tramp-loaddefs
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sh hides /usr/local/share/emacs/site-lisp/tramp-sh
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-cmds hides /usr/local/share/emacs/site-lisp/tramp-cmds
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-gvfs hides /usr/local/share/emacs/site-lisp/tramp-gvfs
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-ftp hides /usr/local/share/emacs/site-lisp/tramp-ftp
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-crypt hides /usr/local/share/emacs/site-lisp/tramp-crypt
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-adb hides /usr/local/share/emacs/site-lisp/tramp-adb
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp hides /usr/local/share/emacs/site-lisp/tramp
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-cache hides /usr/local/share/emacs/site-lisp/tramp-cache
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-rclone hides /usr/local/share/emacs/site-lisp/tramp-rclone
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-compat hides /usr/local/share/emacs/site-lisp/tramp-compat
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-integration hides /usr/local/share/emacs/site-lisp/tramp-integration
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-archive hides /usr/local/share/emacs/site-lisp/tramp-archive
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sudoedit hides /usr/local/share/emacs/site-lisp/tramp-sudoedit
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-loaddefs hides /usr/local/share/emacs/site-lisp/tramp-loaddefs
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-uu hides /usr/local/share/emacs/site-lisp/tramp-uu
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-smb hides /usr/local/share/emacs/site-lisp/tramp-smb
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/trampver hides /usr/local/share/emacs/site-lisp/trampver
/home/albinus/.emacs.d/elpa/auth-source-pass-20210210.1908/auth-source-pass hides /usr/local/share/emacs/28.0.50/lisp/auth-source-pass
/home/albinus/.emacs.d/elpa/transient-20210920.1038/transient hides /usr/local/share/emacs/28.0.50/lisp/transient
~/lisp/dbus hides /usr/local/share/emacs/28.0.50/lisp/net/dbus
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sh hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-sh
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-fuse hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-fuse
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-ftp hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-ftp
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp hides /usr/local/share/emacs/28.0.50/lisp/net/tramp
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-cache hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-cache
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-uu hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-uu
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-rclone hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-rclone
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-integration hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-integration
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-archive hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-archive
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-adb hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-adb
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-cmds hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-cmds
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-compat hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-compat
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sudoedit hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-sudoedit
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-gvfs hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-gvfs
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-loaddefs hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-loaddefs
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-crypt hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-crypt
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-smb hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-smb
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/trampver hides /usr/local/share/emacs/28.0.50/lisp/net/trampver
/home/albinus/.emacs.d/elpa/tramp-2.5.1.3/tramp-sshfs hides /usr/local/share/emacs/28.0.50/lisp/net/tramp-sshfs

Features:
(tramp-adb tramp-archive tramp-cmds tramp-ftp make-mode macros
dockerfile-mode sh-script smie executable gnus-eform nndir nnfolder
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs helm-for-files helm-comint helm-imenu
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet helm-bookmark helm-external helm-mode
helm-elisp helm-files image-dired dired-x ffap helm-buffers helm-tags
helm-locate helm-eval edebug helm-occur helm-grep helm-regexp helm-net
helm-adaptive helm-info helm-utils helm-types helm-help helm
async-bytecomp helm-global-bindings helm-easymenu helm-source
helm-multi-match async helm-lib lsp-html lsp-icons lsp-completion
lsp-semantic-tokens lsp-mode lsp-protocol tree-widget spinner lv inline
ht f git-rebase magit-bookmark bookmark magit-submodule magit-obsolete
magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull
magit-fetch magit-clone magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log magit-diff git-commit magit-core
magit-autorevert magit-margin magit-transient magit-process which-func
imenu with-editor magit-mode transient magit-git magit-section benchmark
gnus-topic request autorevert filenotify anaphora virtualenvwrapper gud
s json-rpc python sound-wav deferred org-agenda org-refile alert log4e
notifications gntp skeleton ibuf-macs ibuf-ext ibuffer ibuffer-loaddefs
promise-rejection-tracking promise-finally promise-done
promise-es6-extensions promise-core trace ert-x ert tramp-gvfs zeroconf
eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module
esh-groups server autoload lisp-mnt tar-mode arc-mode archive-mode
cus-edit cus-start cus-load finder-inf org-element avl-tree generator
ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search
ol-docview doc-view image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
org-version ob-emacs-lisp org-table org-loaddefs cal-menu calendar
cal-loaddefs debug backtrace markdown-mode magit-utils pcase emba glab
ghub-graphql treepy gsexp ghub let-alist log-view whitespace log-edit
pcvs-util ediff-vers ediff ediff-merg ediff-mult ediff-wind ediff-diff
ediff-help ediff-init ediff-util vc-dir ewoc eieio-opt speedbar ezimage
dframe find-func shortdoc cl-print noutline outline tramp-sshfs
tramp-fuse esh-util help-fns radix-tree texinfo texinfo-loaddefs pulse
bug-reference vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs
find-dired xref project grep compile misearch multi-isearch vc-git
yaml-mode dired-aux mailalias shadow emacsbug nndoc gnus-dup crm
debbugs-gnu add-log debbugs soap-client warnings rng-xsd rng-dt rng-util
xsd-regexp smerge-mode diff diff-mode easy-mmode pp timezone eww xdg
thingatpt mm-url time-stamp url-queue shr-color color flow-fill
mm-archive gnus-fun url-http url-gw url-auth gnus-gravatar gravatar dns
url-cache sort smiley gnus-cite mail-extr gnus-bcklg mule-util
gnus-async cl-extra help-mode qp gnus-ml pop3 utf-7 nndraft nnmh nnml
gnutls network-stream nsm gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig
gnus-cache gnus-sum shr kinsoku svg dom nnnil smtpmail sendmail
gnus-demon nntp gnus-group gnus-undo gnus-start gnus-dbus dbus xml
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search
mail-utils mm-util mail-prsvr wid-edit edmacro kmacro face-remap
ob-shell ob ob-tangle ol org-src ob-ref ob-lob ob-table ob-exp ob-comint
ob-core ob-eval org-keys org-compat advice org-macs vc vc-dispatcher
cperl-mode rx facemenu time tramp-sh docker-tramp kubernetes-tramp
tramp-cache lxc-tramp lxd-tramp vagrant-tramp dash term disp-table ehelp
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
shell pcomplete comint ansi-color ring parse-time iso8601 time-date
ls-lisp format-spec delsel ido jka-compr icomplete paren dired
dired-loaddefs info package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 2958714 377787)
 (symbols 48 69907 28)
 (strings 32 434184 72294)
 (string-bytes 1 22686982)
 (vectors 16 140465)
 (vector-slots 8 2459768 224714)
 (floats 8 1203 7214)
 (intervals 56 544255 3222)
 (buffers 992 134))