Skip to content

Commit f11d10d

Browse files
committed
Merge pull request #10 from dkogan/master
log-edit buffer is now called "*amend*" when amending and "*commit*" otherwise
2 parents 3379d7f + 5811817 commit f11d10d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

commit-patch-buffer.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ one."
6363
(call-process-region (point-min) (point-max)
6464
"lsdiff" nil lsdiff nil)))
6565
(split-string (buffer-string))))))
66+
(log-buffer-name (if amend "*amend*" "*commit*"))
6667
(f patch-files) visiting-buffers)
6768
(while (car f)
6869
(let ((buf (find-buffer-visiting (car f))))
@@ -71,7 +72,7 @@ one."
7172
(add-to-list 'visiting-buffers buf)))
7273
(setq f (cdr f)))
7374
(if amend
74-
(with-current-buffer (get-buffer-create "*commit*")
75+
(with-current-buffer (get-buffer-create log-buffer-name)
7576
(erase-buffer)
7677
(insert (or (commit-patch-last-log-comment directory) ""))
7778
(goto-char 0)))
@@ -108,7 +109,7 @@ one."
108109
(delete-file patch))))
109110
nil
110111
`((log-edit-listfun . (lambda () ',patch-files)))
111-
"*commit*")))
112+
log-buffer-name)))
112113

113114
(defun commit-patch-buffer (&optional arg amend)
114115
"Commit the patch in the current buffer, applying it to the

0 commit comments

Comments
 (0)