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

Subsystems: the rest

STALE3715d

4 messages, 3 authors, 2016-06-15 · open the first message on its own page

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

From: Matt Kraai <hidden>
Date: 2016-06-15 22:43:36

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 <redacted>
---
 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

Re: [PATCH] Create .dotest-merge after validating options.

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:36

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 <redacted>

Ciao,
Dscho

Re: [PATCH] Create .dotest-merge after validating options.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:37

Matt Kraai [off-list ref] 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.

Re: [PATCH] Create .dotest-merge after validating options.

From: Matt Kraai <hidden>
Date: 2016-06-15 22:43:37

On Thu, Sep 27, 2007 at 12:29:09AM -0700, Junio C Hamano wrote:
Matt Kraai [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help