git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH] git-request-pull: add --stat option
Date: Thu, 24 Apr 2014 11:29:23 +0200	[thread overview]
Message-ID: <1398331763-601-1-git-send-email-jslaby@suse.cz> (raw)

Which is passed on to git diff. I very need this option instead of
changing the terminal size.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 git-request-pull.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/git-request-pull.sh b/git-request-pull.sh
index 5c1599752314..a23f03fddec0 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -13,6 +13,7 @@ OPTIONS_STUCKLONG=
 OPTIONS_SPEC='git request-pull [options] start url [end]
 --
 p    show patch text as well
+stat= specify stat output (see man git-diff for details)
 '
 
 . git-sh-setup
@@ -21,11 +22,16 @@ GIT_PAGER=
 export GIT_PAGER
 
 patch=
+stat=--stat
 while	case "$#" in 0) break ;; esac
 do
 	case "$1" in
 	-p)
 		patch=-p ;;
+	--stat)
+		stat="$1=$2"
+		shift
+		;;
 	--)
 		shift; break ;;
 	-*)
@@ -152,6 +158,6 @@ then
 fi &&
 
 git shortlog ^$baserev $headrev &&
-git diff -M --stat --summary $patch $merge_base..$headrev || status=1
+git diff -M $stat --summary $patch $merge_base..$headrev || status=1
 
 exit $status
-- 
1.9.2

             reply	other threads:[~2014-04-24  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24  9:29 Jiri Slaby [this message]
2014-04-24 17:46 ` [PATCH] git-request-pull: add --stat option 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=1398331763-601-1-git-send-email-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).