All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest
@ 2008-02-05 15:14 Jari Aalto
  2008-02-05 15:23 ` Mike Hommey
  2008-02-05 15:28 ` Johannes Schindelin
  0 siblings, 2 replies; 12+ messages in thread
From: Jari Aalto @ 2008-02-05 15:14 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-06  1:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-05 15:14 [PATCH] git-rebase.sh: Change .dotest directory to .git-dotest Jari Aalto
2008-02-05 15:23 ` 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

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.