mirror of
https://github.com/git/git.git
synced 2024-11-17 22:44:49 +01:00
Merge branch 'se/rebase' into next
* se/rebase: Make git rebase interactive help match documentation.
This commit is contained in:
commit
af3d7a6a72
3 changed files with 30 additions and 13 deletions
|
@ -9,9 +9,7 @@ SYNOPSIS
|
||||||
--------
|
--------
|
||||||
'git-rebase' [--onto <newbase>] <upstream> [<branch>]
|
'git-rebase' [--onto <newbase>] <upstream> [<branch>]
|
||||||
|
|
||||||
'git-rebase' --continue
|
'git-rebase' --continue | --skip | --abort
|
||||||
|
|
||||||
'git-rebase' --abort
|
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
-----------
|
-----------
|
||||||
|
@ -23,9 +21,10 @@ not exist in the <upstream> branch.
|
||||||
|
|
||||||
It is possible that a merge failure will prevent this process from being
|
It is possible that a merge failure will prevent this process from being
|
||||||
completely automatic. You will have to resolve any such merge failure
|
completely automatic. You will have to resolve any such merge failure
|
||||||
and run `git rebase --continue`. If you can not resolve the merge
|
and run `git rebase --continue`. Another option is to bypass the commit
|
||||||
failure, running `git rebase --abort` will restore the original <branch>
|
that caused the merge failure with `git rebase --skip`. To restore the
|
||||||
and remove the working files found in the .dotest directory.
|
original <branch> and remove the .dotest working files, use the command
|
||||||
|
`git rebase --abort` instead.
|
||||||
|
|
||||||
Note that if <branch> is not specified on the command line, the currently
|
Note that if <branch> is not specified on the command line, the currently
|
||||||
checked out branch is used.
|
checked out branch is used.
|
||||||
|
|
11
git-am.sh
11
git-am.sh
|
@ -15,6 +15,10 @@ stop_here () {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_here_user_resolve () {
|
stop_here_user_resolve () {
|
||||||
|
if [ -n "$resolvemsg" ]; then
|
||||||
|
echo "$resolvemsg"
|
||||||
|
stop_here $1
|
||||||
|
fi
|
||||||
cmdline=$(basename $0)
|
cmdline=$(basename $0)
|
||||||
if test '' != "$interactive"
|
if test '' != "$interactive"
|
||||||
then
|
then
|
||||||
|
@ -121,7 +125,7 @@ fall_back_3way () {
|
||||||
}
|
}
|
||||||
|
|
||||||
prec=4
|
prec=4
|
||||||
dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws=
|
dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg=
|
||||||
|
|
||||||
while case "$#" in 0) break;; esac
|
while case "$#" in 0) break;; esac
|
||||||
do
|
do
|
||||||
|
@ -157,6 +161,9 @@ do
|
||||||
--whitespace=*)
|
--whitespace=*)
|
||||||
ws=$1; shift ;;
|
ws=$1; shift ;;
|
||||||
|
|
||||||
|
--resolvemsg=*)
|
||||||
|
resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;;
|
||||||
|
|
||||||
--)
|
--)
|
||||||
shift; break ;;
|
shift; break ;;
|
||||||
-*)
|
-*)
|
||||||
|
@ -185,7 +192,7 @@ then
|
||||||
else
|
else
|
||||||
# Make sure we are not given --skip nor --resolved
|
# Make sure we are not given --skip nor --resolved
|
||||||
test ",$skip,$resolved," = ,,, ||
|
test ",$skip,$resolved," = ,,, ||
|
||||||
die "we are not resuming."
|
die "Resolve operation not in progress, we are not resuming."
|
||||||
|
|
||||||
# Start afresh.
|
# Start afresh.
|
||||||
mkdir -p "$dotest" || exit
|
mkdir -p "$dotest" || exit
|
||||||
|
|
|
@ -12,9 +12,10 @@ It then attempts to create a new commit for each commit from the original
|
||||||
|
|
||||||
It is possible that a merge failure will prevent this process from being
|
It is possible that a merge failure will prevent this process from being
|
||||||
completely automatic. You will have to resolve any such merge failure
|
completely automatic. You will have to resolve any such merge failure
|
||||||
and run git-rebase --continue. If you can not resolve the merge failure,
|
and run git rebase --continue. Another option is to bypass the commit
|
||||||
running git-rebase --abort will restore the original <branch> and remove
|
that caused the merge failure with git rebase --skip. To restore the
|
||||||
the working files found in the .dotest directory.
|
original <branch> and remove the .dotest working files, use the command
|
||||||
|
git rebase --abort instead.
|
||||||
|
|
||||||
Note that if <branch> is not specified on the command line, the
|
Note that if <branch> is not specified on the command line, the
|
||||||
currently checked out branch is used. You must be in the top
|
currently checked out branch is used. You must be in the top
|
||||||
|
@ -28,6 +29,11 @@ Example: git-rebase master~1 topic
|
||||||
'
|
'
|
||||||
. git-sh-setup
|
. git-sh-setup
|
||||||
|
|
||||||
|
RESOLVEMSG="
|
||||||
|
When you have resolved this problem run \"git rebase --continue\".
|
||||||
|
If you would prefer to skip this patch, instead run \"git rebase --skip\".
|
||||||
|
To restore the original branch and stop rebasing run \"git rebase --abort\".
|
||||||
|
"
|
||||||
unset newbase
|
unset newbase
|
||||||
while case "$#" in 0) break ;; esac
|
while case "$#" in 0) break ;; esac
|
||||||
do
|
do
|
||||||
|
@ -40,7 +46,11 @@ do
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
git am --resolved --3way
|
git am --resolved --3way --resolvemsg="$RESOLVEMSG"
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
--skip)
|
||||||
|
git am -3 --skip --resolvemsg="$RESOLVEMSG"
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
--abort)
|
--abort)
|
||||||
|
@ -143,4 +153,5 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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
|
git am --binary -3 -k --resolvemsg="$RESOLVEMSG"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue