git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Kågedal" <davidk@lysator.liu.se>
To: kha@treskal.com, catalin.marinas@gmail.com
Cc: git@vger.kernel.org
Subject: [StGit PATCH 2/3] stgit.el: Added numeric prefix argument to push and pop commands.
Date: Thu, 30 Oct 2008 10:52:54 +0100	[thread overview]
Message-ID: <20081030095253.10290.43869.stgit@krank> (raw)
In-Reply-To: <20081030095221.10290.58637.stgit@krank>

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@lysator.liu.se>
---
 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 ()

  parent reply	other threads:[~2008-10-30 10:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30  9:52 [StGit PATCH 0/3] stgit.el patches David Kågedal
2008-10-30  9:52 ` [StGit PATCH 1/3] stgit.el: Added undo command David Kågedal
2008-10-30 11:57   ` Karl Hasselström
2008-10-30 14:57     ` David Kågedal
2008-10-30  9:52 ` David Kågedal [this message]
2008-10-30  9:52 ` [StGit PATCH 3/3] stgit.el: Adapt to new output from stg series David Kågedal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081030095253.10290.43869.stgit@krank \
    --to=davidk@lysator.liu.se \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kha@treskal.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).