[StGit PATCH 5/5] Emacs mode: use "stg new --file"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Creating a new patch is a great deal easier now that "stg new" has a
--file flag.

Signed-off-by: Karl Hasselström <kha@xxxxxxxxxxx>

---

David, will you sanity-check this? I don't really speak elisp, so I
might have done something insane without knowing it. But it does seem
to work. :-)

 contrib/stgit.el |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)


diff --git a/contrib/stgit.el b/contrib/stgit.el
index bef41c7..30c1cd1 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -316,16 +316,10 @@ Commands:
 
 (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))))
 

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux