Skip to content

Commit 4397441

Browse files
MorganJamesSmithjpgrayson
authored andcommitted
stgit.el: Fix emacs pre-pending "Summary: " to log-edit buffers
1 parent 67c7c7b commit 4397441

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

contrib/stgit.el

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,8 +2606,14 @@ file ended up. You can then jump to the file with \
26062606

26072607
(defun stgit-confirm-edit ()
26082608
(interactive)
2609-
(let ((file (make-temp-file "stgit-edit-")))
2610-
(write-region (point-min) (point-max) file)
2609+
(let ((file (make-temp-file "stgit-edit-"))
2610+
(start (point-min))
2611+
(summary-string "Summary: "))
2612+
;; log-edit puts this summary string here that we do not want
2613+
(if (string-equal (buffer-substring start (+ 1 (length summary-string)))
2614+
summary-string)
2615+
(setq start (+ start (length summary-string))))
2616+
(write-region start (point-max) file)
26112617
(stgit-capture-output nil
26122618
(stgit-run "edit" "-f" file "--" stgit-edit-patchsym))
26132619
(with-current-buffer log-edit-parent-buffer

0 commit comments

Comments
 (0)