]> git.eshelyaron.com Git - emacs.git/commit
Make call of remote `id' more performant in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Thu, 8 Sep 2022 08:36:08 +0000 (10:36 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Thu, 8 Sep 2022 08:36:08 +0000 (10:36 +0200)
commit684950eb945064b8273109fc165818edd470da32
tree9df322aed4c7aa128040980c9dffb65e265454bb
parente97ca476a138411c4624d76028eefba47e974e7c
Make call of remote `id' more performant in Tramp

* lisp/net/tramp-adb.el (tramp-adb-handle-file-exists-p): New defun.
(tramp-adb-file-name-handler-alist): Use it.
(tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-readable-p)
(tramp-adb-handle-file-writable-p)
(tramp-adb-handle-get-remote-uid)
(tramp-adb-handle-get-remote-gid)
(tramp-adb-handle-get-remote-groups): Use caches consequently.

* lisp/net/tramp-sh.el (tramp-perl-id, tramp-python-id): New defconsts.
(tramp-sh-handle-get-remote-uid, tramp-sh-handle-get-remote-gid)
(tramp-sh-handle-get-remote-groups): Use caches consequently.
(tramp-sh-handle-file-writable-p): Use `file-writable-p'.
(tramp-expand-script): Handle also "python" expansion.
(tramp-get-remote-id): Do not set connection property anymore,
this is done differently now.
(tramp-get-remote-uid-with-id, tramp-get-remote-uid-with-perl)
(tramp-get-remote-uid-with-python, tramp-get-remote-gid-with-id)
(tramp-get-remote-gid-with-perl)
(tramp-get-remote-gid-with-python): Remove.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p)
(tramp-sudoedit-handle-file-exists-p)
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p):
(tramp-sudoedit-handle-get-remote-uid)
(tramp-sudoedit-handle-get-remote-gid)
(tramp-sudoedit-handle-get-remote-groups): Use caches consequently.

* lisp/net/tramp.el (tramp-check-cached-permissions):
Call `tramp-get-remote-groups' only if needed.
(tramp-get-remote-groups): Do not return default value.
(tramp-read-id-output): New defun.

* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-perl):
Suppress also remote `id'.
lisp/net/tramp-adb.el
lisp/net/tramp-sh.el
lisp/net/tramp-sudoedit.el
lisp/net/tramp.el
test/lisp/net/tramp-tests.el