emulate append-to-file, because it doesn't work over tramp
This commit is contained in:
parent
3d2321b317
commit
7ca25460fa
1 changed files with 5 additions and 1 deletions
6
magit.el
6
magit.el
|
@ -3129,7 +3129,11 @@ Prefix arg means justify as well."
|
||||||
(let ((ignore-file (if local ".git/info/exclude" ".gitignore")))
|
(let ((ignore-file (if local ".git/info/exclude" ".gitignore")))
|
||||||
(if edit
|
(if edit
|
||||||
(setq file (read-string "File to ignore: " file)))
|
(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)))
|
(magit-need-refresh)))
|
||||||
|
|
||||||
(defun magit-ignore-item ()
|
(defun magit-ignore-item ()
|
||||||
|
|
Loading…
Reference in a new issue