branch: elpa/magit
commit 66731bda44f3e7810306f2910f18fefb348415ae
Author: Troy Hinckley <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-start-process: Handle tramp-pipe-stty-settings being unbound
Currently if you set `magit-tramp-pipe-stty-settings` to `pty` it will
bind `tramp-pipe-stty-settings` to its own symbol value. But if tramp
has not been loaded yet this will result in referencing a void variable.
---
CHANGELOG | 4 ++++
lisp/magit-process.el | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG b/CHANGELOG
index f5fee0d53de..051cbcdc850 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,10 @@ Bug fixes:
that margin, then the old width was not restored when the mode was
disabled. #5236
+- Prior to Tramp being loaded, setting ~magit-tramp-pipe-stty-settings~
+ to ~nil~ resulted in an error, due to ~tramp-pipe-stty-settings~ not
+ being bound yet. #5240
+
* v4.1.1 2024-10-01
- Avoid unnecessary work when ~auto-revert-remote-files~ is ~nil~. #5222
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index d2e78a17a88..bb26652a8d5 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -619,7 +619,7 @@ Magit status buffer."
;; Defaults to "", to allow staging hunks over
;; Tramp again. #4720
magit-tramp-pipe-stty-settings)
- tramp-pipe-stty-settings))
+ (bound-and-true-p tramp-pipe-stty-settings)))
(process-environment (magit-process-environment))
(default-process-coding-system (magit--process-coding-system)))
(apply #'start-file-process