From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [RFC] request-pull with diff body itself
Date: Mon, 27 Jul 2009 23:53:57 +0400 [thread overview]
Message-ID: <20090727195357.GE17942@lenovo> (raw)
Here is rfc in a sake of having ability to produce
diff body in small series of changes in request-pull.
we could use ">>" here and append diff by hands but
adding "-p" option seems more comfortable.
Dunno, just a thought.
Please CC me, I'm not subscribed.
-- Cyrill
---
[RFC] request-pull -- produce long diff if needed
Allow git request-pull to append diff body into
pull request. It's really useful for small series
of commits.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
This is just an RFC -- so if you don't like it feel
free to just drop. I found useful to have an ability
to pass additional "-p" option and have diff body in
request.
git-request-pull.sh | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
Index: git.git/git-request-pull.sh
=====================================================================
--- git.git.orig/git-request-pull.sh
+++ git.git/git-request-pull.sh
@@ -4,7 +4,7 @@
# This file is licensed under the GPL v2, or a later version
# at the discretion of Linus Torvalds.
-USAGE='<start> <url> [<end>]'
+USAGE='[-p] <start> <url> [<end>]'
LONG_USAGE='Summarizes the changes between two commits to the standard output,
and includes the given URL in the generated summary.'
SUBDIRECTORY_OK='Yes'
@@ -15,6 +15,16 @@ OPTIONS_SPEC=
GIT_PAGER=
export GIT_PAGER
+usediff="no"
+if [ $# -eq 4 ]; then
+ if [ $1 = "-p" ]; then
+ usediff="yes"
+ shift
+ else
+ usage
+ fi
+fi
+
base=$1
url=$2
head=${3-HEAD}
@@ -55,4 +65,10 @@ echo
git shortlog ^$baserev $headrev
git diff -M --stat --summary $merge_base $headrev
+
+if [ "$usediff" = "yes" ]; then
+ echo "---"
+ git diff -M -p $merge_base $headrev
+fi
+
exit $status
next reply other threads:[~2009-07-27 20:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-27 19:53 Cyrill Gorcunov [this message]
2009-07-27 20:46 ` [RFC] request-pull with diff body itself Junio C Hamano
2009-07-27 20:56 ` Cyrill Gorcunov
2009-07-27 21:27 ` Junio C Hamano
2009-07-28 6:00 ` Cyrill Gorcunov
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=20090727195357.GE17942@lenovo \
--to=gorcunov@gmail.com \
--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).