From: Christian Couder Date: Fri, 26 Jun 2009 21:08:46 GMT Subject: [PATCH 4/4] rebase -i: use "git sequencer--helper --make-patch" 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 --- 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