# [PATCH] Create .dotest-merge after validating options.

4 messages from 2007-09-26 to 2007-09-27. Participants: Matt Kraai, Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/10023

## Matt Kraai, 2007-09-26 01:30

Subject: [PATCH] Create .dotest-merge after validating options.
Message-ID: <1190770213-8651-1-git-send-email-kraai@ftbfs.org>
URL: https://gitlist.dev/e/1190770213-8651-1-git-send-email-kraai%40ftbfs.org

```
Creating .dotest-merge before validating the options prevents both
--continue and --interactive from working if the options are invalid,
so only create it after validating the options.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
---
 git-rebase--interactive.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 2fa53fd..7466b5a 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -406,7 +406,6 @@ do
 
 		require_clean_work_tree
 
-		mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
 		if test ! -z "$2"
 		then
 			output git show-ref --verify --quiet "refs/heads/$2" ||
@@ -418,6 +417,8 @@ do
 		HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
 		UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
 
+		mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
+
 		test -z "$ONTO" && ONTO=$UPSTREAM
 
 		: > "$DOTEST"/interactive || die "Could not mark as interactive"
-- 
1.5.3.2

```

## Johannes Schindelin, 2007-09-26 01:38

Subject: Re: [PATCH] Create .dotest-merge after validating options.
Message-ID: <Pine.LNX.4.64.0709260237350.28395@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0709260237350.28395%40racer.site
In-Reply-To: <1190770213-8651-1-git-send-email-kraai@ftbfs.org>

```
Hi,

On Tue, 25 Sep 2007, Matt Kraai wrote:

> Creating .dotest-merge before validating the options prevents both 
> --continue and --interactive from working if the options are invalid, so 
> only create it after validating the options.

Looks very reasonable to me.

Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Ciao,
Dscho

```

## Junio C Hamano, 2007-09-27 07:29

Subject: Re: [PATCH] Create .dotest-merge after validating options.
Message-ID: <7vfy10woqi.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfy10woqi.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <1190770213-8651-1-git-send-email-kraai@ftbfs.org>

```
Matt Kraai <kraai@ftbfs.org> writes:

> Creating .dotest-merge before validating the options prevents both
> --continue and --interactive from working if the options are invalid,
> so only create it after validating the options.

Thanks.  Will apply with a minor fixup.  Next time, please make
sure the testsuite passes before submitting.

```

## Matt Kraai, 2007-09-27 14:03

Subject: Re: [PATCH] Create .dotest-merge after validating options.
Message-ID: <20070927140312.GA4499@ftbfs.org>
URL: https://gitlist.dev/e/20070927140312.GA4499%40ftbfs.org
In-Reply-To: <7vfy10woqi.fsf@gitster.siamese.dyndns.org>

```
On Thu, Sep 27, 2007 at 12:29:09AM -0700, Junio C Hamano wrote:
> Matt Kraai <kraai@ftbfs.org> writes:
> 
> > Creating .dotest-merge before validating the options prevents both
> > --continue and --interactive from working if the options are invalid,
> > so only create it after validating the options.
> 
> Thanks.  Will apply with a minor fixup.  Next time, please make
> sure the testsuite passes before submitting.

Will do, thanks.

-- 
Matt

```
