summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e67c4d3)
raw | patch | inline | side by side (parent: e67c4d3)
author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | |
Tue, 28 Dec 2010 09:30:26 +0000 (10:30 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 28 Dec 2010 23:04:38 +0000 (15:04 -0800) |
Make sure to interpret variables with the same name in the same way in
git-rebase.sh and git-rebase--interactive.sh. This will make it easier
to factor out code from git-rebase.sh to git-rebase--interactive and
export the variables.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase.sh and git-rebase--interactive.sh. This will make it easier
to factor out code from git-rebase.sh to git-rebase--interactive and
export the variables.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh | patch | blob | history | |
git-rebase.sh | patch | blob | history |
index 310d80ee8a52414ed5e42d46c0d4dd74f340e3d1..1af739a0254068be1f9f6ae0de88b3423bd52ff9 100755 (executable)
# No point in merging the first parent, that's HEAD
new_parents=${new_parents# $first_parent}
if ! do_with_author output \
- git merge $strategy -m "$msg" $new_parents
+ git merge ${strategy:+-s $strategy} -m "$msg" \
+ $new_parents
then
printf "%s\n" "$msg" > "$GIT_DIR"/MERGE_MSG
die_with_patch $sha1 "Error redoing merge $sha1"
-s)
case "$#,$1" in
*,*=*)
- strategy="-s "$(expr "z$1" : 'z-[^=]*=\(.*\)') ;;
+ strategy=$(expr "z$1" : 'z-[^=]*=\(.*\)') ;;
1,*)
usage ;;
*)
- strategy="-s $2"
+ strategy="$2"
shift ;;
esac
;;
autosquash=
;;
--onto)
+ test 2 -le "$#" || usage
+ onto="$2"
shift
- onto=$(parse_onto "$1") ||
- die "Does not point to a valid commit: $1"
;;
--)
shift
shift
done
+if test -n "$onto"
+then
+ onto=$(parse_onto "$onto") || die "Does not point to a valid commit: $1"
+fi
+
test -z "$rebase_root" -a $# -ge 1 -a $# -le 2 ||
test ! -z "$rebase_root" -a $# -le 1 || usage
test -d "$DOTEST" &&
diff --git a/git-rebase.sh b/git-rebase.sh
index dc133e3714af990684f68293022cf5d6a5264987..21366ba1973d3866ba36ecb7e33e9e1b9ce9dd2c 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
To restore the original branch and stop rebasing run \"git rebase --abort\".
"
unset onto
-strategy=recursive
+strategy=
strategy_opts=
do_merge=
merge_dir="$GIT_DIR"/rebase-merge
then
GIT_MERGE_VERBOSITY=1 && export GIT_MERGE_VERBOSITY
fi
+ test -z "$strategy" && strategy=recursive
eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"'
rv=$?
case "$rv" in
esac
strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--$newopt")"
do_merge=t
+ test -z "$strategy" && strategy=recursive
;;
-s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\
--strateg=*|--strategy=*|\