GNU bug report logs -
#71200
TRAMP: Trying to do a project-find-file or (find-directory) using the podman method causes a (wrong-type-argument stringp nil) error
Previous Next
Reported by: alexis purslane <alexispurslane <at> pm.me>
Date: Sun, 26 May 2024 00:14:01 UTC
Severity: normal
Fixed in version 30.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
Message #62 received at 71200 <at> debbugs.gnu.org (full text, mbox):
On 27/05/2024 05:06, alexis purslane wrote:
> Another piece of code that may be helpful:
>
> ```
> (advice-add 'project-remember-project
> ;; If we're about to save a project
> :before (lambda (pr &optional something)
> ;; If we're using git, and git detects it as "dubious" (git ls-files = 128),
> (when (and (eq 'Git (cadr pr))
> (let ((default-directory (caddr pr)))
> (= (shell-command "git ls-files") 128)))
> ;; Prompt the user if they want to automatically treat it as safe!
> (when (y-or-n-p "Dubious ownership of repository detected. Treat as safe? ")
> (shell-command
> (concat "git config --global --add safe.directory "
> (eshell-escape-arg (directory-file-name (file-local-name (caddr pr))))))))))
> ```
>
> It basically emulates VSCode's reaction to untrusted repositories.
Sounds useful.
But if you wanted Emacs to include such functionality automatically, I'm
not quite sure what would be the best place for it. OT1H if VS Code has
this, it's probably not the worst idea, but OT2H it seems quite specific
to use with containers (because in other cases you either wouldn't have
this problem, or would solve it differently).
BTW project 0.11.0 is out, if you wanted to try it.
This bug report was last modified 1 year and 50 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.