[magit-status] Use generate-new-buffer for creating a new buffer

Closes #13: We used to use get-buffer-create, but it will reuse a
buffer with the same name, when we want to create a new one with an
unique name.
This commit is contained in:
Rémi Vanicat 2010-05-26 17:15:50 +02:00
parent 0bb2e4c86f
commit ab90bdf159

View file

@ -2495,7 +2495,7 @@ insert a line to tell how to insert more of them"
(setq topdir (magit-get-top-dir dir))))
(when topdir
(let ((buf (or (magit-find-buffer 'status topdir)
(get-buffer-create
(generate-new-buffer
(concat "*magit: "
(file-name-nondirectory
(directory-file-name topdir)) "*")))))