Nicola Archibald <[EMAIL PROTECTED]> writes: > When using Tramp connections to a remote unix system, with vc-git > enabled, while browsing in the source > tree of a git repository, the use of 'git ls-files' produces strange, > unwanted, behaviour that interferes > with the functioning of ido-mode and possibly others. > > Specifically, once vc-git has identified that the remote directory is > part of a git repository, it > starts using 'git ls-files -c -z --' to obtain file information > instead of the normal method of ls/stat.
That is not "instead of". vc-git uses this command in function `vc-git-registered'. > Unfortunately, every filename that is returned this way seems to have > a ^M appended onto the end of > each filename and directory name, confusing the ssh connection into > appending ^M onto every line, > breaking and subsequently ido-mode's file browsing. Hmm. I cannot reproduce it here (using "GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-11-08 on LENNART-69DE564"). The remote machine runs Ubuntu 8.10. However, it looks like a changed tty on the remote side. I don't see where it shall occur, but maybe you can send the whole Tramp traces (tramp-verbose set to 8 shall be sufficient). > I'm unsure if this is a bug in vc-git, tramp, emacsw32, or 'git > ls-files', but I imagine that filtering spurious ^Ms in tramp is > probably the easiest workaround. Not so simple, unfortunately. There might be cases, where an ^M matters. Just filtering it out is not the solution; Tramp tries to set the remote tty properly therefore. Have you experienced this with other vc backends as well? If not, we shall investigate vc-git in more detail. Best regards. Michael.