Make git rebase interactive help match documentation.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
Sean committed
May 13, 2006 at 23:34 UTC
cc120056a881101326488e3c5c2d3af2ce3a8de6
3 files changed
+30
-13
Documentation/git-rebase.txt
+5
-6
@@ -9,9 +9,7 @@ SYNOPSIS
9
--------
10
'git-rebase' [--onto <newbase>] <upstream> [<branch>]
11
12
-'git-rebase' --continue
13
-
14
-'git-rebase' --abort
12
+'git-rebase' --continue | --skip | --abort
13
14
DESCRIPTION
15
-----------
@@ -23,9 +21,10 @@ not exist in the <upstream> branch.
21
22
It is possible that a merge failure will prevent this process from being
23
completely automatic. You will have to resolve any such merge failure
26
-and run `git rebase --continue`. If you can not resolve the merge
27
-failure, running `git rebase --abort` will restore the original <branch>
28
-and remove the working files found in the .dotest directory.
24
+and run `git rebase --continue`. Another option is to bypass the commit
25
+that caused the merge failure with `git rebase --skip`. To restore the
26
+original <branch> and remove the .dotest working files, use the command
27
+`git rebase --abort` instead.
28
29
Note that if <branch> is not specified on the command line, the currently
30
checked out branch is used.
git-am.sh
+9
-2
@@ -15,6 +15,10 @@ stop_here () {
15
}
16
17
stop_here_user_resolve () {
18
+ if [ -n "$resolvemsg" ]; then
19
+ echo "$resolvemsg"
20
+ stop_here $1
21
+ fi
22
cmdline=$(basename $0)
23
if test '' != "$interactive"
24
then
@@ -121,7 +125,7 @@ fall_back_3way () {
125
}
126
127
prec=4
124
-dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws=
128
+dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg=
129
130
while case "$#" in 0) break;; esac
131
do
@@ -157,6 +161,9 @@ do
161
--whitespace=*)
162
ws=$1; shift ;;
163
164
+ --resolvemsg=*)
165
+ resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;;
166
+
167
--)
168
shift; break ;;
169
-*)
@@ -185,7 +192,7 @@ then
192
else
193
# Make sure we are not given --skip nor --resolved
194
test ",$skip,$resolved," = ,,, ||
188
- die "we are not resuming."
195
+ die "Resolve operation not in progress, we are not resuming."
196
197
# Start afresh.
198
mkdir -p "$dotest" || exit
git-rebase.sh
+16
-5
@@ -12,9 +12,10 @@ It then attempts to create a new commit for each commit from the original
12
13
It is possible that a merge failure will prevent this process from being
14
completely automatic. You will have to resolve any such merge failure
15
-and run git-rebase --continue. If you can not resolve the merge failure,
16
-running git-rebase --abort will restore the original <branch> and remove
17
-the working files found in the .dotest directory.
15
+and run git rebase --continue. Another option is to bypass the commit
16
+that caused the merge failure with git rebase --skip. To restore the
17
+original <branch> and remove the .dotest working files, use the command
18
+git rebase --abort instead.
19
20
Note that if <branch> is not specified on the command line, the
21
currently checked out branch is used. You must be in the top
@@ -28,6 +29,11 @@ Example: git-rebase master~1 topic
29
'
30
. git-sh-setup
31
32
+RESOLVEMSG="
33
+When you have resolved this problem run \"git rebase --continue\".
34
+If you would prefer to skip this patch, instead run \"git rebase --skip\".
35
+To restore the original branch and stop rebasing run \"git rebase --abort\".
36
+"
37
unset newbase
38
while case "$#" in 0) break ;; esac
39
do
@@ -40,7 +46,11 @@ do
46
exit 1
47
;;
48
esac
43
- git am --resolved --3way
49
+ git am --resolved --3way --resolvemsg="$RESOLVEMSG"
50
+ exit
51
+ ;;
52
+ --skip)
53
+ git am -3 --skip --resolvemsg="$RESOLVEMSG"
54
exit
55
;;
56
--abort)
@@ -143,4 +153,5 @@ then
153
fi
154
155
git-format-patch -k --stdout --full-index "$upstream" ORIG_HEAD |
146
-git am --binary -3 -k
156
+git am --binary -3 -k --resolvemsg="$RESOLVEMSG"
157
+