Browse Source

Record rebase changes as 'rebase' in the reflog.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Shawn Pearce 19 years ago committed by Junio C Hamano
parent
commit
8ef1c7c77d
  1. 6
      git-am.sh
  2. 9
      git-rebase.sh

6
git-am.sh

@ -91,6 +91,7 @@ fall_back_3way () {
} }


prec=4 prec=4
rloga=am
dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg= dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg=


while case "$#" in 0) break;; esac while case "$#" in 0) break;; esac
@ -130,6 +131,9 @@ do
--resolvemsg=*) --resolvemsg=*)
resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;; resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;;


--reflog-action=*)
rloga=`expr "z$1" : 'z-[^=]*=\(.*\)'`; shift ;;

--) --)
shift; break ;; shift; break ;;
-*) -*)
@ -413,7 +417,7 @@ do
parent=$(git-rev-parse --verify HEAD) && parent=$(git-rev-parse --verify HEAD) &&
commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") && commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") &&
echo Committed: $commit && echo Committed: $commit &&
git-update-ref -m "am: $SUBJECT" HEAD $commit $parent || git-update-ref -m "$rloga: $SUBJECT" HEAD $commit $parent ||
stop_here $this stop_here $this


if test -x "$GIT_DIR"/hooks/post-applypatch if test -x "$GIT_DIR"/hooks/post-applypatch

9
git-rebase.sh

@ -131,7 +131,8 @@ do
finish_rb_merge finish_rb_merge
exit exit
fi fi
git am --resolved --3way --resolvemsg="$RESOLVEMSG" git am --resolved --3way --resolvemsg="$RESOLVEMSG" \
--reflog-action=rebase
exit exit
;; ;;
--skip) --skip)
@ -150,7 +151,8 @@ do
finish_rb_merge finish_rb_merge
exit exit
fi fi
git am -3 --skip --resolvemsg="$RESOLVEMSG" git am -3 --skip --resolvemsg="$RESOLVEMSG" \
--reflog-action=rebase
exit exit
;; ;;
--abort) --abort)
@ -288,7 +290,8 @@ fi
if test -z "$do_merge" if test -z "$do_merge"
then then
git-format-patch -k --stdout --full-index "$upstream"..ORIG_HEAD | git-format-patch -k --stdout --full-index "$upstream"..ORIG_HEAD |
git am --binary -3 -k --resolvemsg="$RESOLVEMSG" git am --binary -3 -k --resolvemsg="$RESOLVEMSG" \
--reflog-action=rebase
exit $? exit $?
fi fi



Loading…
Cancel
Save