From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [PATCH] Use "git cherry-pick" in "git rebase"
Date: Fri, 26 Aug 2005 18:19:02 -0700 [thread overview]
Message-ID: <7vacj489dl.fsf@assigned-by-dhcp.cox.net> (raw)
Rewrite "git rebase" using "git cherry-pick".
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
git-rebase-script | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
913404ae6371857c21c696cc3d8b0a04421fdeb2
diff --git a/git-rebase-script b/git-rebase-script
--- a/git-rebase-script
+++ b/git-rebase-script
@@ -37,7 +37,7 @@ git-rev-parse --verify "$upstream^0" >"$
tmp=.rebase-tmp$$
fail=$tmp-fail
-trap "rm -rf $tmp-*" 0 1 2 3 15
+trap "rm -rf $tmp-*" 1 2 3 15
>$fail
@@ -48,14 +48,18 @@ do
-) continue ;;
esac
S=`cat "$GIT_DIR/HEAD"` &&
- GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p $commit &&
- git-commit-script -C "$commit" || {
+ git-cherry-pick-script --replay $commit || {
+ echo >&2 "* Not applying the patch and continuing."
echo $commit >>$fail
- git-read-tree --reset -u $S
+ git-reset-script --hard $S
}
done
if test -s $fail
then
- echo Some commits could not be rebased, check by hand:
- cat $fail
+ echo >&2 Some commits could not be rebased, check by hand:
+ cat >&2 $fail
+ echo >&2 "(the same list of commits are found in $tmp)"
+ exit 1
+else
+ rm -f $fail
fi
reply other threads:[~2005-08-27 1:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=7vacj489dl.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
/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).