From: Jari Aalto <jari.aalto@cante.net>
To: git@vger.kernel.org
Subject: [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest
Date: Tue, 05 Feb 2008 17:14:28 +0200 [thread overview]
Message-ID: <ve53xwob.fsf@blue.sea.net> (raw)
Change git specific doings into namespace .git*. Define new variable
WORKDIR, which points to working directory .git-dotest.
Signed-off-by: Jari Aalto <jari.aalto AT cante.net>
---
git-rebase.sh | 41 +++++++++++++++++++++--------------------
1 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index ec052c4..259096f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -14,7 +14,7 @@ It is possible that a merge failure will prevent this process from being
completely automatic. You will have to resolve any such merge failure
and run git rebase --continue. Another option is to bypass the commit
that caused the merge failure with git rebase --skip. To restore the
-original <branch> and remove the .dotest working files, use the command
+original <branch> and remove the .git-dotest working files, use the command
git rebase --abort instead.
Note that if <branch> is not specified on the command line, the
@@ -43,7 +43,8 @@ To restore the original branch and stop rebasing run \"git rebase --abort\".
unset newbase
strategy=recursive
do_merge=
-dotest=$GIT_DIR/.dotest-merge
+WORKDIR=$GIT_DIR/.git-dotest
+dotest=$WORKDIR-merge
prec=4
verbose=
git_am_opt=
@@ -171,9 +172,9 @@ do
finish_rb_merge
exit
fi
- head_name=$(cat .dotest/head-name) &&
- onto=$(cat .dotest/onto) &&
- orig_head=$(cat .dotest/orig-head) &&
+ head_name=$(cat $WORKDIR/head-name) &&
+ onto=$(cat $WORKDIR/onto) &&
+ orig_head=$(cat $WORKDIR/orig-head) &&
git am $git_am_opt --resolved --3way \
--resolvemsg="$RESOLVEMSG" &&
move_to_original_branch
@@ -197,9 +198,9 @@ do
finish_rb_merge
exit
fi
- head_name=$(cat .dotest/head-name) &&
- onto=$(cat .dotest/onto) &&
- orig_head=$(cat .dotest/orig-head) &&
+ head_name=$(cat $WORKDIR/head-name) &&
+ onto=$(cat $WORKDIR/onto) &&
+ orig_head=$(cat $WORKDIR/orig-head) &&
git am -3 --skip --resolvemsg="$RESOLVEMSG" &&
move_to_original_branch
exit
@@ -210,11 +211,11 @@ do
then
move_to_original_branch
rm -r "$dotest"
- elif test -d .dotest
+ elif test -d $WORKDIR
then
- dotest=.dotest
+ dotest=$WORKDIR
move_to_original_branch
- rm -r .dotest
+ rm -r $WORKDIR
else
die "No rebase in progress?"
fi
@@ -262,17 +263,17 @@ do
shift
done
-# Make sure we do not have .dotest
+# Make sure we do not have $WORKDIR
if test -z "$do_merge"
then
- if mkdir .dotest
+ if mkdir $WORKDIR
then
- rmdir .dotest
+ rmdir $WORKDIR
else
echo >&2 '
-It seems that I cannot create a .dotest directory, and I wonder if you
+It seems that I cannot create a $WORKDIR directory, and I wonder if you
are in the middle of patch application or another rebase. If that is not
-the case, please rm -fr .dotest and run me again. I am stopping in case
+the case, please rm -fr $WORKDIR and run me again. I am stopping in case
you still have something valuable there.'
exit 1
fi
@@ -381,10 +382,10 @@ then
git am $git_am_opt --binary -3 -k --resolvemsg="$RESOLVEMSG" &&
move_to_original_branch
ret=$?
- test 0 != $ret -a -d .dotest &&
- echo $head_name > .dotest/head-name &&
- echo $onto > .dotest/onto &&
- echo $orig_head > .dotest/orig-head
+ test 0 != $ret -a -d $WORKDIR &&
+ echo $head_name > $WORKDIR/head-name &&
+ echo $onto > $WORKDIR/onto &&
+ echo $orig_head > $WORKDIR/orig-head
exit $ret
fi
--
1.5.4-rc5.GIT-dirty
--
Welcome to FOSS revolution: we fix and modify until it shines
next reply other threads:[~2008-02-05 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 15:14 Jari Aalto [this message]
2008-02-05 15:23 ` [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest Mike Hommey
2008-02-05 15:28 ` Johannes Schindelin
2008-02-05 21:25 ` Jari Aalto
2008-02-05 21:49 ` Linus Torvalds
2008-02-05 22:41 ` Johannes Schindelin
2008-02-05 22:51 ` Jari Aalto
2008-02-05 23:04 ` Johannes Schindelin
2008-02-06 0:48 ` Junio C Hamano
2008-02-05 23:24 ` Kristian Høgsberg
2008-02-06 0:56 ` Johannes Schindelin
2008-02-06 1:37 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ve53xwob.fsf@blue.sea.net \
--to=jari.aalto@cante.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.