chiark / gitweb /
Emacs mode: use "stg new --file"
authorKarl Hasselström <kha@treskal.com>
Tue, 20 May 2008 21:33:24 +0000 (23:33 +0200)
committerKarl Hasselström <kha@treskal.com>
Tue, 20 May 2008 21:33:24 +0000 (23:33 +0200)
Creating a new patch is a great deal easier now that "stg new" has a
--file flag.

Signed-off-by: Karl Hasselström <kha@treskal.com>
contrib/stgit.el

index 2a6fee3becf56aaf598faab77a12e41f67f279b6..437722a38e953397605e8da3f0bd2f46c7dcf135 100644 (file)
@@ -327,16 +327,10 @@ (defun stgit-new ()
 
 (defun stgit-confirm-new ()
   (interactive)
-  (let ((file (make-temp-file "stgit-edit-"))
-        (patch (stgit-create-patch-name
-                (buffer-substring (point-min)
-                                  (save-excursion (goto-char (point-min))
-                                                  (end-of-line)
-                                                  (point))))))
+  (let ((file (make-temp-file "stgit-edit-")))
     (write-region (point-min) (point-max) file)
     (stgit-capture-output nil
-      (stgit-run "new" "-m" "placeholder" patch)
-      (stgit-run "edit" "-f" file patch))
+      (stgit-run "new" "-f" file))
     (with-current-buffer log-edit-parent-buffer
       (stgit-refresh))))