projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mailinfo: barf and exist upon nested multipart.
[git.git]
/
git-rebase-script
diff --git
a/git-rebase-script
b/git-rebase-script
index
a335b99
..
b0893cc
100755
(executable)
--- a/
git-rebase-script
+++ b/
git-rebase-script
@@
-37,25
+37,32
@@
git-rev-parse --verify "$upstream^0" >"$GIT_DIR/HEAD" || exit
tmp=.rebase-tmp$$
fail=$tmp-fail
tmp=.rebase-tmp$$
fail=$tmp-fail
-trap "rm -rf $tmp-*"
0
1 2 3 15
+trap "rm -rf $tmp-*" 1 2 3 15
>$fail
>$fail
-git-cherry $upstream $ours |
-while read sign commit
+git-cherry
-v
$upstream $ours |
+while read sign commit
msg
do
case "$sign" in
do
case "$sign" in
- -) continue ;;
+ -)
+ echo >&2 "* Already applied: $msg"
+ continue ;;
esac
esac
+ echo >&2 "* Applying: $msg"
S=`cat "$GIT_DIR/HEAD"` &&
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
echo $commit >>$fail
- git-re
ad-tree --reset -u
$S
+ git-re
set-script --hard
$S
}
done
if test -s $fail
then
}
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
fi