git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] request-pull with diff body itself

From
Cyrill Gorcunov <gorcunov@gmail.com>
Date
Jul 27, 2009, 19:53 UTC
Message-ID
<20090727195357.GE17942@lenovo>

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: Junio C Hamano
Message 1 of 5 in “[RFC] request-pull with diff body itself”
  1. Cyrill GorcunovJul 27, 2009
  2. Junio C HamanoJul 27, 2009
  3. Cyrill GorcunovJul 27, 2009
  4. Junio C HamanoJul 27, 2009
  5. Cyrill GorcunovJul 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.