From 7ca25460fa581a4e1258f08f23e5cc065fbd018d Mon Sep 17 00:00:00 2001 From: Alexey Voinov Date: Fri, 12 Mar 2010 18:06:13 +0300 Subject: [PATCH] emulate append-to-file, because it doesn't work over tramp --- magit.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/magit.el b/magit.el index cfc3ea96..4e4e8073 100644 --- a/magit.el +++ b/magit.el @@ -3129,7 +3129,11 @@ Prefix arg means justify as well." (let ((ignore-file (if local ".git/info/exclude" ".gitignore"))) (if edit (setq file (read-string "File to ignore: " file))) - (append-to-file (concat "/" file "\n") nil ignore-file) + (with-temp-buffer + (insert-file-contents ignore-file) + (goto-char (point-max)) + (insert "/" file "\n") + (write-region nil nil ignore-file)) (magit-need-refresh))) (defun magit-ignore-item ()