PRESERVE_MERGES=
STRATEGY=
VERBOSE=
+test -d "$REWRITTEN" && PRESERVE_MERGES=t
+test -f "$DOTEST"/strategy && STRATEGY="$(cat "$DOTEST"/strategy)"
+test -f "$DOTEST"/verbose && VERBOSE=t
warn () {
echo "$*" >&2
fi &&
message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" &&
git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
- git symbolic-ref HEAD $HEADNAME &&
+ git symbolic-ref HEAD $HEADNAME && {
+ test ! -f "$DOTEST"/verbose ||
+ git diff --stat $(cat "$DOTEST"/head)..HEAD
+ } &&
rm -rf "$DOTEST" &&
warn "Successfully rebased and updated $HEADNAME."
do
do_next
done
- test -f "$DOTEST"/verbose &&
- git diff --stat $(cat "$DOTEST"/head)..HEAD
- exit
}
while case $# in 0) break ;; esac
echo $HEAD > "$DOTEST"/head
echo $UPSTREAM > "$DOTEST"/upstream
echo $ONTO > "$DOTEST"/onto
+ test -z "$STRATEGY" || echo "$STRATEGY" > "$DOTEST"/strategy
test t = "$VERBOSE" && : > "$DOTEST"/verbose
if [ t = "$PRESERVE_MERGES" ]
then
# pick = use commit
# edit = use commit, but stop for amending
# squash = use commit, but meld into previous commit
+#
+# If you remove a line here THAT COMMIT WILL BE LOST.
+#
EOF
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
--abbrev=7 --reverse $UPSTREAM..$HEAD | \