[StGit PATCH 2/3] stgit.el: Added numeric prefix argument to push and pop commands.

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

 



By using a numerical prefix (or simply C-u) it is possible to push or
pop more than one patch.

Signed-off-by: David Kågedal <davidk@xxxxxxxxxxxxxx>
---
 contrib/stgit.el |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/contrib/stgit.el b/contrib/stgit.el
index e6b7d70..9907952 100644
--- a/contrib/stgit.el
+++ b/contrib/stgit.el
@@ -276,16 +276,19 @@ Commands:
   (stgit-capture-output nil (stgit-run "uncommit" "-n" (number-to-string arg)))
   (stgit-refresh))
 
-(defun stgit-push-next ()
-  "Push the first unapplied patch"
-  (interactive)
-  (stgit-capture-output nil (stgit-run "push"))
+(defun stgit-push-next (npatches)
+  "Push the first unapplied patch.
+With numeric prefix argument, push that many patches."
+  (interactive "p")
+  (stgit-capture-output nil (stgit-run "push" "-n"
+                                       (number-to-string npatches)))
   (stgit-refresh))
 
-(defun stgit-pop-next ()
-  "Pop the topmost applied patch"
-  (interactive)
-  (stgit-capture-output nil (stgit-run "pop"))
+(defun stgit-pop-next (npatches)
+  "Pop the topmost applied patch.
+With numeric prefix argument, pop that many patches."
+  (interactive "p")
+  (stgit-capture-output nil (stgit-run "pop" "-n" (number-to-string npatches)))
   (stgit-refresh))
 
 (defun stgit-applied-at-point ()

--
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