[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.5.2-pre emacs-28/77c97fe4aee0889319f69da76735b75ae7801493);

From: Michael Albinus
Subject: Re: tramp (2.5.2-pre emacs-28/77c97fe4aee0889319f69da76735b75ae7801493); vc-print-log show empty log.
Date: Sun, 10 Oct 2021 11:38:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

ASANO Fumihisa <> writes:

> Hi.


> I cannot use vc-print-log (git) with tramp master (git HEAD).
> Empty log was shown.
> With tramp-2.5.1, It is OK.
> This issue happened after 4784087c2ec30966c0ee91681dbca75cee5a986b .

This commit is not wrong, it has just uncovered an existing error.

> From tramp master *debug tramp/sshx rhel.local*
> 11:35:13.718979 tramp-send-command (6) # cd /tmp/tramp/ && unset GIT_DIR && 
> exec   env INSIDE_EMACS\=28.0.60\,tramp\:2.5.2-pre 
> PS1\=/sshx\:rhel.local\:/tmp/tramp/\ \#\$\  LC_MESSAGES\=C git --no-pager log 
> --no-color -n 2000 -- \:\(literal\)c\:/tmp/tramp/README
> From tramp 2.5.1  *debug tramp/sshx rhel.local*
> 11:33:44.216368 tramp-send-command (6) # cd /tmp/tramp/ && unset GIT_DIR && 
> exec   env INSIDE_EMACS\=28.0.60\,tramp\:2.5.1 
> PS1\=/sshx\:rhel.local\:/tmp/tramp/\ \#\$\  LC_MESSAGES\=C git --no-pager log 
> --no-color -n 2000 -- \:\(literal\)/tmp/tramp/README
> I think, this issue occur since the remote file path have windows drive 
> letter in tramp master.

Yes. See this function in vc-git.el:

--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
    (let ((lname (file-local-name file)))
      ;; Expand abbreviated file names.
      (when (file-name-absolute-p lname)
        (setq lname (expand-file-name lname)))
      (concat ":(literal)" lname))))
--8<---------------cut here---------------end--------------->8---

expand-file-name is called on the *local* part of the remote file
name. This prepends the drive letter.

I've opened a new Emacs bug report bug#51112.

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]