git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 6/7] Add an optional limit to git-formatpatch
@ 2006-01-08  0:40 Yann Dirson
  2006-01-08  9:30 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Yann Dirson @ 2006-01-08  0:40 UTC (permalink / raw)
  To: GIT list

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-08  9:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-08  0:40 [PATCH 6/7] Add an optional limit to git-formatpatch Yann Dirson
2006-01-08  9:30 ` Junio C Hamano

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