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

[PATCH 4/4] rebase -i: use "git sequencer--helper --make-patch"

From
Christian Couder <chriscool@tuxfamily.org>
Date
Jun 26, 2009, 21:08 UTC
Message-ID
<20090626210847.3885.97099.chriscool@tuxfamily.org>
In-Reply-To
<20090626205319.3885.91532.chriscool@tuxfamily.org>
to simplify the "make_patch" function.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-rebase--interactive.sh |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 3be49dd..82f1133 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -146,18 +146,7 @@ load_author_ident () {
 }
 
 make_patch () {
-	sha1_and_parents="$(git rev-list --parents -1 "$1")"
-	case "$sha1_and_parents" in
-	?*' '?*' '?*)
-		git diff --cc $sha1_and_parents
-		;;
-	?*' '?*)
-		git diff-tree -p "$1^!"
-		;;
-	*)
-		echo "Root commit"
-		;;
-	esac > "$DOTEST"/patch
+	git sequencer--helper --make-patch "$1"
 	test -f "$DOTEST"/message ||
 		git cat-file commit "$1" | sed "1,/^$/d" > "$DOTEST"/message
 	test -f "$SAVE_AUTHOR_INFO" || {
-- 
1.6.3.GIT
Previous: Christian Couder
Message 6 of 6 in “start using sequencer code to port "rebase -i"”
  1. 0/4 start using sequencer code to port "rebase -i"Christian Couder, Jun 26, 2009
  2. 1/4 sequencer: add "builtin-sequencer--helper.c"Christian Couder, Jun 26, 2009
  3. 2/4 sequencer: add "make_patch" function to save a patchChristian Couder, Jun 26, 2009
  4. Christian CouderJun 28, 2009
  5. 3/4 sequencer: free memory used in "make_patch" functionChristian Couder, Jun 26, 2009
  6. 4/4 rebase -i: use "git sequencer--helper --make-patch"Christian Couder, Jun 26, 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.