Skip to content

Commit 28ed6e7

Browse files
dschogitster
authored andcommitted
Rename ".dotest/" to ".git/rebase" and ".dotest-merge" to "rebase-merge"
Since the files generated and used during a rebase are never to be tracked, they should live in $GIT_DIR. While at it, avoid the rather meaningless term "dotest" to "rebase", and unhide ".dotest-merge". This was wished for on the mailing list, but so far unimplemented. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 6c11a5f commit 28ed6e7

15 files changed

+66
-66
lines changed

Documentation/SubmittingPatches

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ If it does not apply correctly, there can be various reasons.
301301
patch appropriately.
302302

303303
* Your MUA corrupted your patch; "am" would complain that
304-
the patch does not apply. Look at .dotest/ subdirectory and
304+
the patch does not apply. Look at .git/rebase/ subdirectory and
305305
see what 'patch' file contains and check for the common
306306
corruption patterns mentioned above.
307307

Documentation/git-am.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ aborts in the middle,. You can recover from this in one of two ways:
140140
the index file to bring it in a state that the patch should
141141
have produced. Then run the command with '--resolved' option.
142142

143-
The command refuses to process new mailboxes while `.dotest`
143+
The command refuses to process new mailboxes while `.git/rebase`
144144
directory exists, so if you decide to start over from scratch,
145-
run `rm -f -r .dotest` before running the command with mailbox
145+
run `rm -f -r .git/rebase` before running the command with mailbox
146146
names.
147147

148148
Before any patches are applied, ORIG_HEAD is set to the tip of the

Documentation/git-rebase.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ It is possible that a merge failure will prevent this process from being
3939
completely automatic. You will have to resolve any such merge failure
4040
and run `git rebase --continue`. Another option is to bypass the commit
4141
that caused the merge failure with `git rebase --skip`. To restore the
42-
original <branch> and remove the .dotest working files, use the command
42+
original <branch> and remove the .git/rebase working files, use the command
4343
`git rebase --abort` instead.
4444

4545
Assume the following history exists and the current branch is "topic":

Documentation/user-manual.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2431,7 +2431,7 @@ $ git rebase origin
24312431
-------------------------------------------------
24322432

24332433
This will remove each of your commits from mywork, temporarily saving
2434-
them as patches (in a directory named ".dotest"), update mywork to
2434+
them as patches (in a directory named ".git/rebase"), update mywork to
24352435
point at the latest version of origin, then apply each of the saved
24362436
patches to the new mywork. The result will look like:
24372437

contrib/completion/git-completion.bash

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,26 @@ __git_ps1 ()
7373
if [ -n "$g" ]; then
7474
local r
7575
local b
76-
if [ -d "$g/../.dotest" ]
76+
if [ -d "$g/rebase" ]
7777
then
78-
if test -f "$g/../.dotest/rebasing"
78+
if test -f "$g/rebase/rebasing"
7979
then
8080
r="|REBASE"
81-
elif test -f "$g/../.dotest/applying"
81+
elif test -f "$g/rebase/applying"
8282
then
8383
r="|AM"
8484
else
8585
r="|AM/REBASE"
8686
fi
8787
b="$(git symbolic-ref HEAD 2>/dev/null)"
88-
elif [ -f "$g/.dotest-merge/interactive" ]
88+
elif [ -f "$g/rebase-merge/interactive" ]
8989
then
9090
r="|REBASE-i"
91-
b="$(cat "$g/.dotest-merge/head-name")"
92-
elif [ -d "$g/.dotest-merge" ]
91+
b="$(cat "$g/rebase-merge/head-name")"
92+
elif [ -d "$g/rebase-merge" ]
9393
then
9494
r="|REBASE-m"
95-
b="$(cat "$g/.dotest-merge/head-name")"
95+
b="$(cat "$g/rebase-merge/head-name")"
9696
elif [ -f "$g/MERGE_HEAD" ]
9797
then
9898
r="|MERGING"
@@ -487,8 +487,8 @@ __git_whitespacelist="nowarn warn error error-all strip"
487487

488488
_git_am ()
489489
{
490-
local cur="${COMP_WORDS[COMP_CWORD]}"
491-
if [ -d .dotest ]; then
490+
local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)"
491+
if [ -d "$dir"/rebase ]; then
492492
__gitcomp "--skip --resolved"
493493
return
494494
fi
@@ -915,7 +915,7 @@ _git_push ()
915915
_git_rebase ()
916916
{
917917
local cur="${COMP_WORDS[COMP_CWORD]}" dir="$(__gitdir)"
918-
if [ -d .dotest ] || [ -d "$dir"/.dotest-merge ]; then
918+
if [ -d "$dir"/rebase ] || [ -d "$dir"/rebase-merge ]; then
919919
__gitcomp "--continue --skip --abort"
920920
return
921921
fi

contrib/emacs/git.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,8 +1252,8 @@ Return the list of files that haven't been handled."
12521252
"\n")
12531253
(when subject (insert subject "\n\n"))
12541254
(cond (msg (insert msg "\n"))
1255-
((file-readable-p ".dotest/msg")
1256-
(insert-file-contents ".dotest/msg"))
1255+
((file-readable-p ".git/rebase/msg")
1256+
(insert-file-contents ".git/rebase/msg"))
12571257
((file-readable-p ".git/MERGE_MSG")
12581258
(insert-file-contents ".git/MERGE_MSG")))
12591259
; delete empty lines at end
@@ -1272,9 +1272,9 @@ Return the list of files that haven't been handled."
12721272
(coding-system (git-get-commits-coding-system))
12731273
author-name author-email subject date)
12741274
(when (eq 0 (buffer-size buffer))
1275-
(when (file-readable-p ".dotest/info")
1275+
(when (file-readable-p ".git/rebase/info")
12761276
(with-temp-buffer
1277-
(insert-file-contents ".dotest/info")
1277+
(insert-file-contents ".git/rebase/info")
12781278
(goto-char (point-min))
12791279
(when (re-search-forward "^Author: \\(.*\\)\nEmail: \\(.*\\)$" nil t)
12801280
(setq author-name (match-string 1))

git-am.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ It does not apply to blobs recorded in its index."
119119
}
120120

121121
prec=4
122-
dotest=".dotest"
122+
dotest="$GIT_DIR/rebase"
123123
sign= utf8=t keep= skip= interactive= resolved= binary= rebasing=
124124
resolvemsg= resume=
125125
git_apply_opt=
@@ -195,7 +195,7 @@ then
195195
false
196196
;;
197197
esac ||
198-
die "previous dotest directory $dotest still exists but mbox given."
198+
die "previous rebase directory $dotest still exists but mbox given."
199199
resume=yes
200200
else
201201
# Make sure we are not given --skip nor --resolved
@@ -325,7 +325,7 @@ do
325325
<"$dotest"/info >/dev/null &&
326326
go_next && continue
327327

328-
test -s $dotest/patch || {
328+
test -s "$dotest/patch" || {
329329
echo "Patch is empty. Was it split wrong?"
330330
stop_here $this
331331
}

git-quiltimport.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if ! [ -d "$QUILT_PATCHES" ] ; then
5353
fi
5454

5555
# Temporary directories
56-
tmp_dir=.dotest
56+
tmp_dir="$GIT_DIR"/rebase
5757
tmp_msg="$tmp_dir/msg"
5858
tmp_patch="$tmp_dir/patch"
5959
tmp_info="$tmp_dir/info"

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ skip skip current patch and continue rebasing process
3131
. git-sh-setup
3232
require_work_tree
3333

34-
DOTEST="$GIT_DIR/.dotest-merge"
34+
DOTEST="$GIT_DIR/rebase-merge"
3535
TODO="$DOTEST"/git-rebase-todo
3636
DONE="$DOTEST"/done
3737
MSG="$DOTEST"/message

git-rebase.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ It is possible that a merge failure will prevent this process from being
1414
completely automatic. You will have to resolve any such merge failure
1515
and run git rebase --continue. Another option is to bypass the commit
1616
that 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
1818
git rebase --abort instead.
1919
2020
Note 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\".
4242
unset newbase
4343
strategy=recursive
4444
do_merge=
45-
dotest=$GIT_DIR/.dotest-merge
45+
dotest="$GIT_DIR"/rebase-merge
4646
prec=4
4747
verbose=
4848
git_am_opt=
@@ -150,7 +150,7 @@ while test $# != 0
150150
do
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 || {
@@ -173,15 +173,15 @@ do
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 $?
@@ -201,23 +201,23 @@ do
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")
@@ -265,24 +265,24 @@ do
265265
shift
266266
done
267267

268-
# Make sure we do not have .dotest
268+
# Make sure we do not have $GIT_DIR/rebase
269269
if test -z "$do_merge"
270270
then
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
277277
are 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
279279
you still have something valuable there.'
280280
exit 1
281281
fi
282282
else
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
288288
fi
@@ -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
404404
fi
405405

0 commit comments

Comments
 (0)