@@ -14,7 +14,7 @@ It is possible that a merge failure will prevent this process from being
1414completely automatic. You will have to resolve any such merge failure
1515and run git rebase --continue. Another option is to bypass the commit
1616that caused the merge failure with git rebase --skip. To restore the
17- original <branch> and remove the .dotest working files, use the command
17+ original <branch> and remove the .git/rebase working files, use the command
1818git rebase --abort instead.
1919
2020Note that if <branch> is not specified on the command line, the
@@ -42,7 +42,7 @@ To restore the original branch and stop rebasing run \"git rebase --abort\".
4242unset newbase
4343strategy=recursive
4444do_merge=
45- dotest=$GIT_DIR /.dotest -merge
45+ dotest=" $GIT_DIR " /rebase -merge
4646prec=4
4747verbose=
4848git_am_opt=
@@ -150,7 +150,7 @@ while test $# != 0
150150do
151151 case " $1 " in
152152 --continue)
153- test -d " $dotest " -o -d .dotest ||
153+ test -d " $dotest " -o -d " $GIT_DIR " /rebase ||
154154 die " No rebase in progress?"
155155
156156 git diff-files --quiet --ignore-submodules || {
173173 finish_rb_merge
174174 exit
175175 fi
176- head_name=$( cat .dotest /head-name) &&
177- onto=$( cat .dotest /onto) &&
178- orig_head=$( cat .dotest /orig-head) &&
176+ head_name=$( cat " $GIT_DIR " /rebase /head-name) &&
177+ onto=$( cat " $GIT_DIR " /rebase /onto) &&
178+ orig_head=$( cat " $GIT_DIR " /rebase /orig-head) &&
179179 git am --resolved --3way --resolvemsg=" $RESOLVEMSG " &&
180180 move_to_original_branch
181181 exit
182182 ;;
183183 --skip)
184- test -d " $dotest " -o -d .dotest ||
184+ test -d " $dotest " -o -d " $GIT_DIR " /rebase ||
185185 die " No rebase in progress?"
186186
187187 git reset --hard HEAD || exit $?
201201 finish_rb_merge
202202 exit
203203 fi
204- head_name=$( cat .dotest /head-name) &&
205- onto=$( cat .dotest /onto) &&
206- orig_head=$( cat .dotest /orig-head) &&
204+ head_name=$( cat " $GIT_DIR " /rebase /head-name) &&
205+ onto=$( cat " $GIT_DIR " /rebase /onto) &&
206+ orig_head=$( cat " $GIT_DIR " /rebase /orig-head) &&
207207 git am -3 --skip --resolvemsg=" $RESOLVEMSG " &&
208208 move_to_original_branch
209209 exit
210210 ;;
211211 --abort)
212- test -d " $dotest " -o -d .dotest ||
212+ test -d " $dotest " -o -d " $GIT_DIR " /rebase ||
213213 die " No rebase in progress?"
214214
215215 git rerere clear
216216 if test -d " $dotest "
217217 then
218218 move_to_original_branch
219219 else
220- dotest=.dotest
220+ dotest=" $GIT_DIR " /rebase
221221 move_to_original_branch
222222 fi
223223 git reset --hard $( cat " $dotest /orig-head" )
265265 shift
266266done
267267
268- # Make sure we do not have .dotest
268+ # Make sure we do not have $GIT_DIR/rebase
269269if test -z " $do_merge "
270270then
271- if mkdir .dotest
271+ if mkdir " $GIT_DIR " /rebase
272272 then
273- rmdir .dotest
273+ rmdir " $GIT_DIR " /rebase
274274 else
275275 echo >&2 '
276- It seems that I cannot create a .dotest directory, and I wonder if you
276+ It seems that I cannot create a ' " $GIT_DIR " ' /rebase directory, and I wonder if you
277277are in the middle of patch application or another rebase. If that is not
278- the case, please rm -fr .dotest and run me again. I am stopping in case
278+ the case, please rm -fr ' " $GIT_DIR " ' /rebase and run me again. I am stopping in case
279279you still have something valuable there.'
280280 exit 1
281281 fi
282282else
283283 if test -d " $dotest "
284284 then
285- die " previous dotest directory $dotest still exists." \
285+ die " previous rebase directory $dotest still exists." \
286286 ' try git-rebase < --continue | --abort >'
287287 fi
288288fi
@@ -396,10 +396,10 @@ then
396396 git am $git_am_opt --rebasing --resolvemsg=" $RESOLVEMSG " &&
397397 move_to_original_branch
398398 ret=$?
399- test 0 ! = $ret -a -d .dotest &&
400- echo $head_name > .dotest /head-name &&
401- echo $onto > .dotest /onto &&
402- echo $orig_head > .dotest /orig-head
399+ test 0 ! = $ret -a -d " $GIT_DIR " /rebase &&
400+ echo $head_name > " $GIT_DIR " /rebase /head-name &&
401+ echo $onto > " $GIT_DIR " /rebase /onto &&
402+ echo $orig_head > " $GIT_DIR " /rebase /orig-head
403403 exit $ret
404404fi
405405
0 commit comments