diff --git a/magit.el b/magit.el index c03ad68d..21f497e5 100644 --- a/magit.el +++ b/magit.el @@ -3804,7 +3804,8 @@ level commits." (if edit (setq file (read-string "File to ignore: " file))) (with-temp-buffer - (insert-file-contents ignore-file) + (when (file-exists-p ignore-file) + (insert-file-contents ignore-file)) (goto-char (point-max)) (unless (bolp) (insert "\n")) diff --git a/magit.texi b/magit.texi index 5955aa6b..98c7feb2 100644 --- a/magit.texi +++ b/magit.texi @@ -649,7 +649,7 @@ it, like from any other diff. Magit will run @code{git push} when you type @kbd{P}. If you give a prefix argument to @kbd{P}, you will be prompted for the repository to -push to. When no default remote repositor has been configured yet for +push to. When no default remote repository has been configured yet for the current branch, you will be prompted as well. Typing @kbd{P} will only push the current branch to the remote. In other words, it will run @code{git push }.