From: Yann Dirson <ydirson@altern.org>
To: GIT list <git@vger.kernel.org>
Subject: [PATCH 6/7] Add an optional limit to git-formatpatch
Date: Sun, 8 Jan 2006 01:40:59 +0100 [thread overview]
Message-ID: <20060108004059.GN1113@nowhere.earth> (raw)
We may not want to format all patches since the merge base.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
git-format-patch.sh | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
a0f52fc065de2bdca4f8e598d4a8a743d183d4d9
diff --git a/git-format-patch.sh b/git-format-patch.sh
index 0948f1f..6a0d331 100755
--- a/git-format-patch.sh
+++ b/git-format-patch.sh
@@ -30,6 +30,7 @@ diff_opts=
LF='
'
+limit=
outdir=./
while case "$#" in 0) break;; esac
do
@@ -45,6 +46,11 @@ do
-k|--k|--ke|--kee|--keep|--keep-|--keep-s|--keep-su|--keep-sub|\
--keep-subj|--keep-subje|--keep-subjec|--keep-subject)
keep_subject=t ;;
+ -l=|--l=|--li=|--lim=|--limi=|--limit=)
+ limit=`expr "$1" : '-[^=]*=\(.*\)'` ;;
+ -l|--l|--li|--lim|--limi|--limit)
+ case "$#" in 1) usage ;; esac; shift
+ limit="$1" ;;
-n|--n|--nu|--num|--numb|--numbe|--number|--numbere|--numbered)
numbered=t ;;
-s|--s|--si|--sig|--sign|--signo|--signof|--signoff)
@@ -136,7 +142,7 @@ do
die "Not a valid rev $rev1 ($revpair)"
git-rev-parse --verify "$rev2^0" >/dev/null 2>&1 ||
die "Not a valid rev $rev2 ($revpair)"
- git-cherry -v "$rev1" "$rev2" |
+ git-cherry -v "$rev1" "$rev2" $limit |
while read sign rev comment
do
case "$sign" in
--
1.0.6-g8ecb
--
Yann Dirson <ydirson@altern.org> |
Debian-related: <dirson@debian.org> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>
next reply other threads:[~2006-01-08 0:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-08 0:40 Yann Dirson [this message]
2006-01-08 9:30 ` [PATCH 6/7] Add an optional limit to git-formatpatch Junio C Hamano
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=20060108004059.GN1113@nowhere.earth \
--to=ydirson@altern.org \
--cc=git@vger.kernel.org \
/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).