Make magit-ignore-file work even if .gitignore doesn't exist.
This commit is contained in:
parent
5744d3ec98
commit
25b4bf7e6e
2 changed files with 3 additions and 2 deletions
3
magit.el
3
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"))
|
||||
|
|
|
@ -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 <remote> <branch>}.
|
||||
|
|
Loading…
Reference in a new issue