[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master acc6732ca1d: Reuse commit message when preparing a single patch
From: |
Philip Kaludercic |
Subject: |
master acc6732ca1d: Reuse commit message when preparing a single patch |
Date: |
Tue, 13 Feb 2024 05:25:24 -0500 (EST) |
branch: master
commit acc6732ca1d39352f1aae3074ad04564178c0954
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Reuse commit message when preparing a single patch
* lisp/vc/vc.el (vc-prepare-patch): Check commit message if only
a single revision was selected.
---
lisp/vc/vc.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index ca6efeabac2..619b469bebb 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -3623,7 +3623,15 @@ revisions.
When invoked interactively in a Log View buffer with
marked revisions, use those."
(interactive
- (let ((revs (vc-prepare-patch-prompt-revisions)) to)
+ (let* ((revs (vc-prepare-patch-prompt-revisions))
+ (subject
+ (and (length= revs 1)
+ (plist-get
+ (vc-call-backend
+ (vc-responsible-backend default-directory)
+ 'prepare-patch (car revs))
+ :subject)))
+ to)
(require 'message)
(while (null (setq to (completing-read-multiple
(format-prompt
@@ -3636,7 +3644,7 @@ marked revisions, use those."
(sit-for blink-matching-delay))
(list (string-join to ", ")
(and (not vc-prepare-patches-separately)
- (read-string "Subject: " "[PATCH] " nil nil t))
+ (read-string "Subject: " (or subject "[PATCH] ") nil nil t))
revs)))
(save-current-buffer
(let ((patches (mapcar (lambda (rev)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master acc6732ca1d: Reuse commit message when preparing a single patch,
Philip Kaludercic <=